mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-07 13:35:49 +02:00
Merge branch 'viewport' into docking
# Conflicts: # imgui.cpp
This commit is contained in:
@ -5529,8 +5529,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;
|
||||
@ -5556,7 +5556,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();
|
||||
@ -5571,8 +5571,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