From 0a110244594494fc3ffed2905edf2303d6f862c0 Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 28 Aug 2015 15:34:53 +0100 Subject: [PATCH] IO.WantInputCharacters -> WantTextInput (#305) --- imgui.cpp | 2 +- imgui.h | 2 +- imgui_demo.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 0e20ca63..fd18fa2a 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1912,7 +1912,7 @@ void ImGui::NewFrame() bool mouse_owned_by_application = mouse_earliest_button_down != -1 && !g.IO.MouseDownOwned[mouse_earliest_button_down]; g.IO.WantCaptureMouse = (!mouse_owned_by_application && g.HoveredWindow != NULL) || (!mouse_owned_by_application && mouse_any_down) || (g.ActiveId != 0) || (!g.OpenedPopupStack.empty()) || (g.CaptureMouseNextFrame); g.IO.WantCaptureKeyboard = (g.ActiveId != 0) || (g.CaptureKeyboardNextFrame); - g.IO.WantInputCharacters = (g.ActiveId != 0 && g.InputTextState.Id == g.ActiveId); + g.IO.WantTextInput = (g.ActiveId != 0 && g.InputTextState.Id == g.ActiveId); g.MouseCursor = ImGuiMouseCursor_Arrow; g.CaptureMouseNextFrame = g.CaptureKeyboardNextFrame = false; diff --git a/imgui.h b/imgui.h index 042a4597..8b9d74c6 100644 --- a/imgui.h +++ b/imgui.h @@ -728,7 +728,7 @@ struct ImGuiIO bool WantCaptureMouse; // Mouse is hovering a window or widget is active (= ImGui will use your mouse input) bool WantCaptureKeyboard; // Widget is active (= ImGui will use your keyboard input) - bool WantInputCharacters; // Some text input widget is active, which will read input characters from the InputCharacters array. + bool WantTextInput; // Some text input widget is active, which will read input characters from the InputCharacters array. float Framerate; // Framerate estimation, in frame per second. Rolling average estimation based on IO.DeltaTime over 120 frames int MetricsAllocs; // Number of active memory allocations int MetricsRenderVertices; // Vertices output during last call to Render() diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 195f7222..a412aae2 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -1343,7 +1343,7 @@ void ImGui::ShowTestWindow(bool* opened) ImGui::Text("WantCaptureMouse: %s", io.WantCaptureMouse ? "true" : "false"); ImGui::Text("WantCaptureKeyboard: %s", io.WantCaptureKeyboard ? "true" : "false"); - ImGui::Text("WantInputCharacters: %s", io.WantInputCharacters ? "true" : "false"); + ImGui::Text("WantTextInput: %s", io.WantTextInput ? "true" : "false"); ImGui::Button("Hover me\nto enforce\ninputs capture"); if (ImGui::IsItemHovered())