Change docs for the "Font Colors" in "Theme Overrides" > "Colors". #10695
PurrfectDreamm
started this conversation in
GUI
Replies: 2 comments 1 reply
-
Theming is explained on Control's doc page, but I agree, many beginners likely don't know to look it in there. Adding tutorial bit in font color's description is not gonna cut it however, since the user might want to change some other themed property. Maybe a little text could be added under the Theme Properties subtitle? A side note: for your smooth color changing see tweening. |
Beta Was this translation helpful? Give feedback.
1 reply
-
All Control & co.'s class reference is in a pretty rough spot, in my opinion. Very inconsistent and general awkward wording make it a confusing mess to navigate. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In short: Change documentation for Font Colors along the path Theme Overrides > Colors > Font Colors, and add there information about how to actually change font color -> $label.add_theme_color_override("font_color", Color(1,1,1,1))
##Description: Where 1,1,1,1 - red, green, blue, alpha / r,g,b,a, and this need to be float numbers from 0.0 to 1.0
In details:
I'm new to Godot and game development in general, and I learning by creating various game mechanics, I decided to change the color of the text when the player takes damage (my idea was to make hp text color red and then after 0.25 sec set hp text color to green, I set up timer for this and tried to change the font_color...) I hovered over "Font Color" along the path Theme Overrides > Colors > Font Color, and as prompt said I tried to change the color of the text like this: %HP.font_color = red
##red = Color(1, 0, 0, 1)
it didn't work... (before you ask, yes my HP label is set to unique name)
Then I tried this: %HP.set_font_color(red), that didn't work either. Then I decided to open the documentation for this Font Color and saw the same font_color [default: Color(1, 1, 1, 1)] - which I have already tried to change a hundred times and it does not work.
Then I started googling and on some forum I found a working method:
$label.add_theme_color_override("font_color", Color(1,1,1,1))
Point is that this documentation for Font Color along the Theme Overrides path should be changed/revised, or at least just add additional information to this documentation, something like: "To set the text color, use add_theme_color_override("font_color", Color(r,g,b,a)", or something like that, idk, I just want to this to be like other helpful docs that I see and instantly understand how something works and how to change it in some way.
I am sure that this change would save many beginners time and nerves in the future, because as for now if you don't know how to set font_color for your text it's just impossible for you to learn how to do it via corresponding Font Color documentation.
Also I would like the option to change color smoothly rather than instantly, but that’s a completely different conversation.
And also would be great to have more usage examples for methods, properties, functions in docs.
Beta Was this translation helpful? Give feedback.
All reactions