From 91e1c56da614ac635fcc61b5a9e37e270c814f21 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sat, 16 Jul 2016 10:46:51 +0200 Subject: [PATCH] Minor bits. --- imgui.cpp | 4 +--- imgui_demo.cpp | 2 +- imgui_internal.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index a8f70f32..e2952a28 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -4488,10 +4488,8 @@ void ImGui::FocusWindow(ImGuiWindow* window) { ImGuiContext& g = *GImGui; - // Always mark the window we passed as focused. This is used for keyboard interactions such as tabbing. - g.FocusedWindow = window; - // Passing NULL allow to disable keyboard focus + g.FocusedWindow = window; if (!window) return; diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 67846e7a..20337f38 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -784,7 +784,7 @@ void ImGui::ShowTestWindow(bool* p_open) struct Funcs { static float Sin(void*, int i) { return sinf(i * 0.1f); } - static float Saw(void*, int i) { return (i & 1) ? 1.0f : 0.0f; } + static float Saw(void*, int i) { return (i & 1) ? 1.0f : -1.0f; } }; static int func_type = 0, display_count = 70; ImGui::Separator(); diff --git a/imgui_internal.h b/imgui_internal.h index 4dfa6479..21a345bf 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -482,7 +482,7 @@ struct ImGuiContext DragCurrentValue = 0.0f; DragLastMouseDelta = ImVec2(0.0f, 0.0f); DragSpeedDefaultRatio = 1.0f / 100.0f; - DragSpeedScaleSlow = 0.01f; + DragSpeedScaleSlow = 1.0f / 100.0f; DragSpeedScaleFast = 10.0f; ScrollbarClickDeltaToGrabCenter = ImVec2(0.0f, 0.0f); memset(Tooltip, 0, sizeof(Tooltip));