You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (g.NavMoveRequestForward == ImGuiNavForward_None)
9213
+
if (g.NavMoveRequestForwardToNextFrame)
9214
+
{
9215
+
// Forwarding previous request (which has been modified, e.g. wrap around menus rewrite the requests with a starting rectangle at the other side of the window)
9216
+
// (Preserve g.NavMoveRequestFlags, g.NavMoveClipDir which were set by the NavMoveRequestForward() function)
else if (g.NavMoveRequestForward == ImGuiNavForward_ForwardQueued)
9229
-
{
9230
-
// Forwarding previous request (which has been modified, e.g. wrap around menus rewrite the requests with a starting rectangle at the other side of the window)
9231
-
// (Preserve g.NavMoveRequestFlags, g.NavMoveClipDir which were set by the NavMoveRequestForward() function)
Copy file name to clipboardExpand all lines: imgui_internal.h
+5-11Lines changed: 5 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1181,14 +1181,8 @@ enum ImGuiNavMoveFlags_
1181
1181
ImGuiNavMoveFlags_WrapY = 1 << 3, // This is not super useful but provided for completeness
1182
1182
ImGuiNavMoveFlags_AllowCurrentNavId = 1 << 4, // Allow scoring and considering the current NavId as a move target candidate. This is used when the move source is offset (e.g. pressing PageDown actually needs to send a Up move request, if we are pressing PageDown from the bottom-most item we need to stay in place)
1183
1183
ImGuiNavMoveFlags_AlsoScoreVisibleSet = 1 << 5, // Store alternate result in NavMoveResultLocalVisibleSet that only comprise elements that are already fully visible (used by PageUp/PageDown)
1184
-
ImGuiNavMoveFlags_ScrollToEdge = 1 << 6
1185
-
};
1186
-
1187
-
enum ImGuiNavForward
1188
-
{
1189
-
ImGuiNavForward_None,
1190
-
ImGuiNavForward_ForwardQueued,
1191
-
ImGuiNavForward_ForwardActive
1184
+
ImGuiNavMoveFlags_ScrollToEdge = 1 << 6,
1185
+
ImGuiNavMoveFlags_Forwarded = 1 << 7
1192
1186
};
1193
1187
1194
1188
enum ImGuiNavLayer
@@ -1525,14 +1519,14 @@ struct ImGuiContext
1525
1519
bool NavMousePosDirty; // When set we will update mouse position if (io.ConfigFlags & ImGuiConfigFlags_NavEnableSetMousePos) if set (NB: this not enabled by default)
1526
1520
bool NavDisableHighlight; // When user starts using mouse, we hide gamepad/keyboard highlight (NB: but they are still available, which is why NavDisableHighlight isn't always != NavDisableMouseHover)
1527
1521
bool NavDisableMouseHover; // When user starts using gamepad/keyboard, we hide mouse hovering highlight until mouse is touched again.
if (g.NavId == id && g.NavMoveRequest && g.NavMoveDir == ImGuiDir_Left && is_open)
5900
+
if (g.NavId == id && g.NavMoveDir == ImGuiDir_Left && is_open)
5901
5901
{
5902
5902
toggled = true;
5903
5903
NavMoveRequestCancel();
5904
5904
}
5905
-
if (g.NavId == id && g.NavMoveRequest && g.NavMoveDir == ImGuiDir_Right && !is_open) // If there's something upcoming on the line we may want to give it the priority?
5905
+
if (g.NavId == id && g.NavMoveDir == ImGuiDir_Right && !is_open) // If there's something upcoming on the line we may want to give it the priority?
5906
5906
{
5907
5907
toggled = true;
5908
5908
NavMoveRequestCancel();
@@ -6690,7 +6690,7 @@ void ImGui::EndMenuBar()
6690
6690
ImGuiWindow* nav_earliest_child = g.NavWindow;
6691
6691
while (nav_earliest_child->ParentWindow && (nav_earliest_child->ParentWindow->Flags & ImGuiWindowFlags_ChildMenu))
// To do so we claim focus back, restore NavId and then process the movement request for yet another frame.
6696
6696
// This involve a one-frame delay which isn't very problematic in this situation. We could remove it by scoring in advance for multiple window (probably not worth bothering)
0 commit comments