-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Text inputs of Drag widgets are not clamped to min and max bounds #3209
Comments
(Copy of comment posted in #1829:
You can easily wrap that behavior:
If you display a color square to "verify" that the return value is correct when out of bound (doesn't return true every frame):
I've also made internal changes to
And TempInputScalar() now has the following comment:
The only thing missing would be to find a nice way to expose new flags to the Slider/Drag api, being considerate of other desirable features that those function wants (#701), so then we can expose clamping behavior in the function signature. I think the |
This is now supported with |
FYI renamed |
Version/Branch of Dear ImGui:
Version: 1.76 WIP
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Operating System: W10
My Issue/Question:
When editing a drag widget with the input text, the value is not clamped between the min and max value passed in parameter. The only way to do this is do redrag a little the widget to update the value.
Screenshots/Video
Standalone, minimal, complete and verifiable example:
The text was updated successfully, but these errors were encountered: