mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-28 11:22:05 +00:00
Menus, Nav: made navigation into menu-bar auto wrap on X axis. (#9178)
This commit is contained in:
@@ -135,6 +135,7 @@ Other Changes:
|
|||||||
- Menus:
|
- Menus:
|
||||||
- Fixed MenuItem() label position and BeginMenu() arrow/icon/popup positions,
|
- Fixed MenuItem() label position and BeginMenu() arrow/icon/popup positions,
|
||||||
when used inside a line with a baseline offset.
|
when used inside a line with a baseline offset.
|
||||||
|
- Made navigation into menu-bar auto wrap on X axis. (#9178)
|
||||||
- TreeNode:
|
- TreeNode:
|
||||||
- Fixed highlight position when used inside a line with a large text baseline offset.
|
- Fixed highlight position when used inside a line with a large text baseline offset.
|
||||||
(never quite worked in this situation; but then most of the time the text
|
(never quite worked in this situation; but then most of the time the text
|
||||||
|
|||||||
@@ -13436,7 +13436,7 @@ void ImGui::NavMoveRequestTryWrapping(ImGuiWindow* window, ImGuiNavMoveFlags wra
|
|||||||
|
|
||||||
// In theory we should test for NavMoveRequestButNoResultYet() but there's no point doing it:
|
// In theory we should test for NavMoveRequestButNoResultYet() but there's no point doing it:
|
||||||
// as NavEndFrame() will do the same test. It will end up calling NavUpdateCreateWrappingRequest().
|
// as NavEndFrame() will do the same test. It will end up calling NavUpdateCreateWrappingRequest().
|
||||||
if (g.NavWindow == window && g.NavMoveScoringItems && g.NavLayer == ImGuiNavLayer_Main)
|
if (g.NavWindow == window && g.NavMoveScoringItems && g.NavLayer == window->DC.NavLayerCurrent)
|
||||||
g.NavMoveFlags = (g.NavMoveFlags & ~ImGuiNavMoveFlags_WrapMask_) | wrap_flags;
|
g.NavMoveFlags = (g.NavMoveFlags & ~ImGuiNavMoveFlags_WrapMask_) | wrap_flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9070,6 +9070,10 @@ void ImGui::EndMenuBar()
|
|||||||
NavMoveRequestForward(g.NavMoveDir, g.NavMoveClipDir, g.NavMoveFlags, g.NavMoveScrollFlags); // Repeat
|
NavMoveRequestForward(g.NavMoveDir, g.NavMoveClipDir, g.NavMoveFlags, g.NavMoveScrollFlags); // Repeat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NavMoveRequestTryWrapping(window, ImGuiNavMoveFlags_WrapX);
|
||||||
|
}
|
||||||
|
|
||||||
PopClipRect();
|
PopClipRect();
|
||||||
PopID();
|
PopID();
|
||||||
|
|||||||
Reference in New Issue
Block a user