From afa0346a0b07c99b6011318c6662878e1e3a3861 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 30 Aug 2015 17:38:42 +0100 Subject: [PATCH] Demo: using DragFloat instead of SliderFloat --- imgui_demo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index f2064a25..a795827a 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -737,22 +737,22 @@ void ImGui::ShowTestWindow(bool* opened) static float f = 0.0f; ImGui::Text("PushItemWidth(100)"); ImGui::PushItemWidth(100); - ImGui::InputFloat("float##1", &f); + ImGui::DragFloat("float##1", &f); ImGui::PopItemWidth(); ImGui::Text("PushItemWidth(GetWindowWidth() * 0.5f);"); ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.5f); - ImGui::InputFloat("float##2", &f); + ImGui::DragFloat("float##2", &f); ImGui::PopItemWidth(); ImGui::Text("PushItemWidth(GetContentRegionAvailWidth() * 0.5f);"); ImGui::PushItemWidth(ImGui::GetContentRegionAvailWidth() * 0.5f); - ImGui::InputFloat("float##3", &f); + ImGui::DragFloat("float##3", &f); ImGui::PopItemWidth(); ImGui::Text("PushItemWidth(-100);"); ImGui::PushItemWidth(-100); - ImGui::InputFloat("float##4", &f); + ImGui::DragFloat("float##4", &f); ImGui::PopItemWidth(); ImGui::TreePop();