From e9070e768ef99303ae72f0f3be3c10c8dc0e2d66 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 25 Jan 2018 16:17:36 +0100 Subject: [PATCH] Nav: Fixed renaming of c09016b12af8e4396c38f06a6cfee2c4e41a18b3 that were incorrect. ImGuiNavInput_PadLeft -> PadDpadLeft, _PadScrollLeft -> PadLStickLeft. (#787) --- imgui.cpp | 14 +++++++------- imgui.h | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 0886e04f7..c0ccf1f70 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2688,11 +2688,11 @@ ImVec2 ImGui::GetNavInputAmount2d(ImGuiNavDirSourceFlags dir_sources, ImGuiInput { ImVec2 delta(0.0f, 0.0f); if (dir_sources & ImGuiNavDirSourceFlags_Key) - delta += ImVec2(GetNavInputAmount(ImGuiNavInput_KeyRight, mode) - GetNavInputAmount(ImGuiNavInput_KeyLeft, mode), GetNavInputAmount(ImGuiNavInput_KeyDown, mode) - GetNavInputAmount(ImGuiNavInput_KeyUp, mode)); + delta += ImVec2(GetNavInputAmount(ImGuiNavInput_KeyRight, mode) - GetNavInputAmount(ImGuiNavInput_KeyLeft, mode), GetNavInputAmount(ImGuiNavInput_KeyDown, mode) - GetNavInputAmount(ImGuiNavInput_KeyUp, mode)); if (dir_sources & ImGuiNavDirSourceFlags_PadLStick) - delta += ImVec2(GetNavInputAmount(ImGuiNavInput_PadLStickRight, mode) - GetNavInputAmount(ImGuiNavInput_PadLStickLeft, mode), GetNavInputAmount(ImGuiNavInput_PadLStickDown, mode) - GetNavInputAmount(ImGuiNavInput_PadLStickUp, mode)); + delta += ImVec2(GetNavInputAmount(ImGuiNavInput_PadDpadRight, mode) - GetNavInputAmount(ImGuiNavInput_PadDpadLeft, mode), GetNavInputAmount(ImGuiNavInput_PadDpadDown, mode) - GetNavInputAmount(ImGuiNavInput_PadDpadUp, mode)); if (dir_sources & ImGuiNavDirSourceFlags_PadRStick) - delta += ImVec2(GetNavInputAmount(ImGuiNavInput_PadRStickRight, mode) - GetNavInputAmount(ImGuiNavInput_PadRStickLeft, mode), GetNavInputAmount(ImGuiNavInput_PadRStickDown, mode) - GetNavInputAmount(ImGuiNavInput_PadRStickUp, mode)); + delta += ImVec2(GetNavInputAmount(ImGuiNavInput_PadLStickRight, mode) - GetNavInputAmount(ImGuiNavInput_PadLStickLeft, mode), GetNavInputAmount(ImGuiNavInput_PadLStickDown, mode) - GetNavInputAmount(ImGuiNavInput_PadLStickUp, mode)); if (slow_factor != 0.0f && IsNavInputDown(ImGuiNavInput_PadTweakSlow)) delta *= slow_factor; if (fast_factor != 0.0f && IsNavInputDown(ImGuiNavInput_PadTweakFast)) @@ -2966,10 +2966,10 @@ static void ImGui::NavUpdate() g.NavMoveDir = ImGuiDir_None; if (g.NavWindow && !g.NavWindowingTarget && allowed_dir_flags && !(g.NavWindow->Flags & ImGuiWindowFlags_NoNavInputs)) { - if ((allowed_dir_flags & (1<