-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Make ProgressBar reflect the real value in the percent label when "allow greater" is checked #83623
Make ProgressBar reflect the real value in the percent label when "allow greater" is checked #83623
Conversation
You can't just divide by max, you need to take min into account also avoid dividing by 0. |
f527c34
to
0a493e8
Compare
It was too good to be right on the first try haha. Now I just need to know if I need to fix the behavior that I mentioned in the video, or if it's expected. |
You're right, it would be much simpler, but I don't think we can do that safely, because some UI elements rely on the value from I just have one question, if the |
0a493e8
to
b4ccea8
Compare
btw " |
b4ccea8
to
acec1f9
Compare
To be honest, I don't see how it could desync, because it's the same logic as the I tried to see if it behaved differently from the stable version, but I don't see the difference, as you can see below (I tried some different values too). Godot 4.1This PR |
Ok the only one I could find was with godot.windows.editor.dev.x86_64_wPldJzsHBo.mp4Other than that the value displays correctly. |
c424cb1
to
57a0653
Compare
Now I think it works as expected. |
57a0653
to
beeca2a
Compare
Thanks, and congrats on your first merged Godot contribution! |
Fix #63311.
I have just a question. When we change the
min value
or themax value
, thecurrent value
is updated if it is above themax value
or below themin value
. Should I implement this behavior when the user togglesAllow Greater/Lesser
? Right now if I toggleAllow Greater/Lesser
it will keep the old value, as you can see in the video below.progressbar.mp4
It seems because in the
Range
class it doesn't emit the change like the other properties (e.g.:page
,max
,min
,etc
.).godot/scene/gui/range.cpp
Lines 360 to 362 in f8818f8