-
-
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
ImGui::SliderInt without %.0f display format behaves diffrently... #467
Comments
Hello, Are you referring to the fact that the first line will display a drag box width that is 1/4 of the total width, and the second line a smooth drag box? This is a side-effect of the fact that ParseFormatPrecision will fail to find a precision modified in the second format string and the default become %.3f because SliderInt() calls SliderFloat(). I can't think of a workaround right now, apart from making sure that your format string contains "%.0f". I'll have to make a correct fix. |
Thanks.
Yes, I meant "drag box width". I tried to use sliderint like a combobox (display texts from char * items[]) |
Nice idea :) |
Closing this old issue, @Demir-Fes, it has been solved in 1.61 by the refactor to support several types.
|
Hello,
SliderInts diffrent each other, I wonder if it is my misundestanding or ... ?
static int i1=0;
static int i2=0;
ImGui::SliderInt("slider int 1", &i1, 0, 3);
ImGui::SliderInt("slider int 2", &i2, 0, 3, "test");
I use some text to display instead of display format.
The text was updated successfully, but these errors were encountered: