From b28995b66702e10c0ec369e0a3ff0426d0e9cba3 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 22 Feb 2018 15:39:49 +0100 Subject: [PATCH] Nav: Internals: Exposed NavMoveRequestCancel in imgui_internal.h (#1640) --- imgui.cpp | 4 ++-- imgui_internal.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index c0b8b0c2d..7f5049a04 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2349,7 +2349,7 @@ static bool NavMoveRequestButNoResultYet() return g.NavMoveRequest && g.NavMoveResultLocal.ID == 0 && g.NavMoveResultOther.ID == 0; } -static void NavMoveRequestCancel() +void ImGui::NavMoveRequestCancel() { ImGuiContext& g = *GImGui; g.NavMoveRequest = false; @@ -5006,7 +5006,7 @@ static void NavProcessMoveRequestWrapAround(ImGuiWindow* window) if ((g.NavMoveDir == ImGuiDir_Up || g.NavMoveDir == ImGuiDir_Down) && g.NavMoveRequestForward == ImGuiNavForward_None && g.NavLayer == 0) { g.NavMoveRequestForward = ImGuiNavForward_ForwardQueued; - NavMoveRequestCancel(); + ImGui::NavMoveRequestCancel(); g.NavWindow->NavRectRel[0].Min.y = g.NavWindow->NavRectRel[0].Max.y = ((g.NavMoveDir == ImGuiDir_Up) ? ImMax(window->SizeFull.y, window->SizeContents.y) : 0.0f) - window->Scroll.y; } } diff --git a/imgui_internal.h b/imgui_internal.h index 77d621bb8..c2c055504 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -1066,6 +1066,7 @@ namespace ImGui IMGUI_API void BeginTooltipEx(ImGuiWindowFlags extra_flags, bool override_previous_tooltip = true); IMGUI_API void NavInitWindow(ImGuiWindow* window, bool force_reinit); + IMGUI_API void NavMoveRequestCancel(); IMGUI_API void ActivateItem(ImGuiID id); // Remotely activate a button, checkbox, tree node etc. given its unique ID. activation is queued and processed on the next frame when the item is encountered again. IMGUI_API float GetNavInputAmount(ImGuiNavInput n, ImGuiInputReadMode mode);