From 7e78865613cc0159d4705997a0d19967eb2767d0 Mon Sep 17 00:00:00 2001 From: omar Date: Sat, 12 Jan 2019 19:46:35 +0100 Subject: [PATCH] Demo: Fixed bounds of DragFloat in Clipping section to avoid passing zero-sized to InvisibleButton(). --- imgui_demo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index dcaa3660..cf1d4b38 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -1988,7 +1988,7 @@ static void ShowDemoWindowLayout() { static ImVec2 size(100, 100), offset(50, 20); ImGui::TextWrapped("On a per-widget basis we are occasionally clipping text CPU-side if it won't fit in its frame. Otherwise we are doing coarser clipping + passing a scissor rectangle to the renderer. The system is designed to try minimizing both execution and CPU/GPU rendering cost."); - ImGui::DragFloat2("size", (float*)&size, 0.5f, 0.0f, 200.0f, "%.0f"); + ImGui::DragFloat2("size", (float*)&size, 0.5f, 1.0f, 200.0f, "%.0f"); ImGui::TextWrapped("(Click and drag)"); ImVec2 pos = ImGui::GetCursorScreenPos(); ImVec4 clip_rect(pos.x, pos.y, pos.x + size.x, pos.y + size.y);