-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
get_stylebox("myStyle") doesn't always get the correct type. #1431
Comments
not sure if i understand this bug, did you give it your own style using code? |
The simplest possible test case When you play the file, it is clear the stylebox type for the bar graphic is flat, but the debug output shows that the function doesn't recognize that and instead says the stylebox type is textured. |
Confirmed in the current master branch. |
First of all thank you for your report and sorry for the delay. We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to. We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us. For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors. Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed. Thanks in advance. Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it. |
ProgressBar really uses StyleBoxTextured by default, but in UI_Test.zip shows an incorrect usage
there is no "myFlatStyle" stylebox in ProgressBar now. The correct usage is
which is correctly handled as StyleBoxFlat or whatever you apply to it. Closed. |
For anyone still coming here: the string passed as the first argument to |
THANK YOU! You just saved me many hours of head-scratching and expletive outbursts! |
Sounds like a documentation improvement is in order. |
Hi, I'm interested in updating the documentation here. Quick clarifying question: Has the |
@zak-grumbles Yes, all the theme item getter methods have been renamed from Make sure to open the pull request against the |
Documentation was improved by #50429. |
An example...
Say I made a progress bar, and I gave it my own style using the "newStyleBoxFlat" entry.
Now say I fetch the bar node using GDscript and used this code...
var Style = myBar.get_stylebox("myFlatStyle")
print(Style)
The print will give me "StyleBoxTextured:#" when it should be saying "StyleBoxFlat:#", as a result, I cannot change the color because the function for that is only for flat styles and the engine thinks I'm using the Textured type..
This shouldn't be too hard to fix I think, thanks.
The text was updated successfully, but these errors were encountered: