mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-07 21:39:54 +02:00
Merge branch 'master' into viewport
# Conflicts: # imgui.cpp # imgui_internal.h
This commit is contained in:
@ -5496,8 +5496,8 @@ bool ImGui::BeginMenuBar()
|
||||
|
||||
window->DC.CursorPos = ImVec2(bar_rect.Min.x + window->DC.MenuBarOffset.x, bar_rect.Min.y + window->DC.MenuBarOffset.y);
|
||||
window->DC.LayoutType = ImGuiLayoutType_Horizontal;
|
||||
window->DC.NavLayerCurrent++;
|
||||
window->DC.NavLayerCurrentMask <<= 1;
|
||||
window->DC.NavLayerCurrent = ImGuiNavLayer_Menu;
|
||||
window->DC.NavLayerCurrentMask = (1 << ImGuiNavLayer_Menu);
|
||||
window->DC.MenuBarAppending = true;
|
||||
AlignTextToFramePadding();
|
||||
return true;
|
||||
@ -5523,7 +5523,7 @@ void ImGui::EndMenuBar()
|
||||
IM_ASSERT(window->DC.NavLayerActiveMaskNext & 0x02); // Sanity check
|
||||
FocusWindow(window);
|
||||
SetNavIDWithRectRel(window->NavLastIds[1], 1, window->NavRectRel[1]);
|
||||
g.NavLayer = 1;
|
||||
g.NavLayer = ImGuiNavLayer_Menu;
|
||||
g.NavDisableHighlight = true; // Hide highlight for the current frame so we don't see the intermediary selection.
|
||||
g.NavMoveRequestForward = ImGuiNavForward_ForwardQueued;
|
||||
NavMoveRequestCancel();
|
||||
@ -5538,8 +5538,8 @@ void ImGui::EndMenuBar()
|
||||
window->DC.GroupStack.back().AdvanceCursor = false;
|
||||
EndGroup(); // Restore position on layer 0
|
||||
window->DC.LayoutType = ImGuiLayoutType_Vertical;
|
||||
window->DC.NavLayerCurrent--;
|
||||
window->DC.NavLayerCurrentMask >>= 1;
|
||||
window->DC.NavLayerCurrent = ImGuiNavLayer_Main;
|
||||
window->DC.NavLayerCurrentMask = (1 << ImGuiNavLayer_Main);
|
||||
window->DC.MenuBarAppending = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user