From 09abf11e56198bad20a0be8992ea00920e777122 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 17 May 2015 23:13:53 +0100 Subject: [PATCH] WIP Menus: BeginMenuBar() return false on window without a menu bar (#126) --- imgui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index c840ba73..abc8a55f 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -7446,8 +7446,9 @@ bool ImGui::BeginMenuBar() ImGuiWindow* window = GetCurrentWindow(); if (window->SkipItems) return false; + if (!(window->Flags & ImGuiWindowFlags_MenuBar)) + return false; - IM_ASSERT(window->Flags & ImGuiWindowFlags_MenuBar); IM_ASSERT(!window->DC.MenuBarAppending); window->DC.MenuBarAppending = true; ImGui::PushID("##menubar");