WIP Menus: BeginMenuBar() return false on window without a menu bar (#126)

This commit is contained in:
ocornut 2015-05-17 23:13:53 +01:00
parent 4bd43bdb35
commit 09abf11e56

View File

@ -7446,8 +7446,9 @@ bool ImGui::BeginMenuBar()
ImGuiWindow* window = GetCurrentWindow(); ImGuiWindow* window = GetCurrentWindow();
if (window->SkipItems) if (window->SkipItems)
return false; return false;
if (!(window->Flags & ImGuiWindowFlags_MenuBar))
return false;
IM_ASSERT(window->Flags & ImGuiWindowFlags_MenuBar);
IM_ASSERT(!window->DC.MenuBarAppending); IM_ASSERT(!window->DC.MenuBarAppending);
window->DC.MenuBarAppending = true; window->DC.MenuBarAppending = true;
ImGui::PushID("##menubar"); ImGui::PushID("##menubar");