mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-24 02:14:22 +00:00
Menus, Nav: made navigation into menu-bar auto wrap on X axis. (#9178)
This commit is contained in:
parent
66bb8add73
commit
3050f653cb
3 changed files with 6 additions and 1 deletions
|
|
@ -135,6 +135,7 @@ Other Changes:
|
|||
- Menus:
|
||||
- Fixed MenuItem() label position and BeginMenu() arrow/icon/popup positions,
|
||||
when used inside a line with a baseline offset.
|
||||
- Made navigation into menu-bar auto wrap on X axis. (#9178)
|
||||
- TreeNode:
|
||||
- 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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9070,6 +9070,10 @@ void ImGui::EndMenuBar()
|
|||
NavMoveRequestForward(g.NavMoveDir, g.NavMoveClipDir, g.NavMoveFlags, g.NavMoveScrollFlags); // Repeat
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NavMoveRequestTryWrapping(window, ImGuiNavMoveFlags_WrapX);
|
||||
}
|
||||
|
||||
PopClipRect();
|
||||
PopID();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue