Closed Rage997 closed 1 year ago
Hello guys,
I am trying to create a menubar on top of a window but no menu is displayed. I followed the example code in the Docs
ImGui.Begin("Debug"); if ( ImGui.BeginMenuBar()) { if ( ImGui.BeginMenu("FIle")) { if (ImGui.Menuitem("Open..", "Ctrl+O")) { /* Do stuff */ } if (ImGui.Menuitem("Save", "Ctrl+S")) { /* Do stuff */ } if (ImGui.Menuitem("Close", "Ctrl+W")) { /* Do stuff */ } ImGui.EndMenu(); } ImGui.EndMenuBar(); } ImGui.End();
any help would be appreciated!
In case anyone else has this problem, all you have to do is to feed the correct flag ImGui.Begin("Debug", null, ImGui.WindowFlags.MenuBar); Wished this was written explicitly in the docs
ImGui.Begin("Debug", null, ImGui.WindowFlags.MenuBar);
Hello guys,
I am trying to create a menubar on top of a window but no menu is displayed. I followed the example code in the Docs
any help would be appreciated!