Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider renaming DrawableHelper#draw*Text* color params -> base/defaultColor #486

Open
supersaiyansubtlety opened this issue Sep 2, 2023 · 0 comments
Labels
discussion changes that need discussion before being implemented

Comments

@supersaiyansubtlety
Copy link
Contributor

AFAICT, the color params of all the draw*Text*(*) methods in DrawableHelper only affect the color of portions of text that don't have a color format specified.

To illustrate what I mean,

"text.test_mod.test_text.single_substitution": "Single substitution: "${key}"",
"text.test_mod.test_text.multicolored": "§cRed§r, §6orange§r, §eyellow§r, §agreen§r, §9blue§r, §5purple§r.",

These texts rendered with
drawCenteredText(MatrixStack matrices, TextRenderer textRenderer, Text text, int centerX, int y, int color)
passed Formatting.<AQUA/WHITE/BLACK>.getColorValue() to color respectively, look like this:
java_9eIjxNILXO
java_uXCGla1Df5
java_nJz5ofs70l

The color passed only applies to text.test_mod.test_text.multicolored where the reset §r is the most recent formatting.

@supersaiyansubtlety supersaiyansubtlety changed the title Consider renaming DrawableHelper#draw...Text color params base/defaultColor Consider renaming DrawableHelper#draw...Text color params -> base/defaultColor Sep 2, 2023
@supersaiyansubtlety supersaiyansubtlety changed the title Consider renaming DrawableHelper#draw...Text color params -> base/defaultColor Consider renaming DrawableHelper#draw*Text* color params -> base/defaultColor Sep 2, 2023
@supersaiyansubtlety supersaiyansubtlety added the discussion changes that need discussion before being implemented label Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion changes that need discussion before being implemented
Projects
None yet
Development

No branches or pull requests

1 participant