mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
DragFloat, DragScalar: Fixed ImGuiSliderFlags_ClampOnInput not being honored in the special case where v_min == v_max. (#3361)
This commit is contained in:
parent
5dc5610ad5
commit
4c201994d4
4 changed files with 53 additions and 16 deletions
|
|
@ -116,6 +116,11 @@ int main(int, char**)
|
|||
ImGui::Checkbox("Another Window", &show_another_window);
|
||||
|
||||
ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
|
||||
|
||||
static float f2 = 0.0f;
|
||||
ImGui::DragFloat("f2 limit", &f2, 1.0f, 0.0f, 100.0f, NULL, ImGuiSliderFlags_ClampOnInput);
|
||||
ImGui::DragFloat("f2", &f2, 1.0f, 0.0f, 0.0f, NULL, ImGuiSliderFlags_ClampOnInput);
|
||||
|
||||
ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
|
||||
|
||||
if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue