-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
SliderInt with reversed range cannot reach min value #3432
Comments
Also, "ImGuiSliderFlags_ClampOnInput" does not work in this situation. template<typename T>
static bool DataTypeClampT(T* v, const T* v_min, const T* v_max)
{
// Clamp, both sides are optional, return true if modified
if (*v_min < *v_max)
{
if (v_min && *v < *v_min) { *v = *v_min; return true; }
if (v_max && *v > *v_max) { *v = *v_max; return true; }
return false;
}
else
{
if (v_min && *v > *v_min) { *v = *v_min; return true; }
if (v_max && *v < *v_max) { *v = *v_max; return true; }
return false;
}
}
|
Now fixed by @rokups with b2039aa. Note that reverse slider weren't really documented until now (added some examples in demo). Will be looking at the clamping next.
That's a crash if either bounds are disabled. |
This is now fixed by 36af398 |
Version: 1.77
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: Custom engine
Operating System: Windows 10
My Issue/Question:
Hi, im making a lua binding for Gideros mobile game engine and recently I discovered that if min slider value is greater than max then int slider cant reach min value. Ive also added a custom slider, but it 99.99% identical to built-in slider. The difference only in drawing knob :)
Screenshots/Video
As you can see, slider cant reach 0 for some reason.
The text was updated successfully, but these errors were encountered: