WIP Menus: Added support for disabled sub-menu (#126)

This commit is contained in:
ocornut
2015-05-26 18:02:42 +01:00
parent 0db122bc3b
commit 6b3ccd3edf
2 changed files with 13 additions and 5 deletions

View File

@ -304,7 +304,7 @@ namespace ImGui
IMGUI_API void EndMainMenuBar();
IMGUI_API bool BeginMenuBar(); // append to menu-bar of current window. only call EndMenuBar() if this returns true!
IMGUI_API void EndMenuBar();
IMGUI_API bool BeginMenu(const char* label); // create a sub-menu entry. only call EndMenu() if this returns true!
IMGUI_API bool BeginMenu(const char* label, bool enabled = true); // create a sub-menu entry. only call EndMenu() if this returns true!
IMGUI_API void EndMenu();
IMGUI_API bool MenuItem(const char* label, const char* shortcut = NULL, bool selected = false, bool enabled = true); // return true when activated. shortcuts are displayed for convenience but not processed by ImGui
IMGUI_API bool MenuItem(const char* label, const char* shortcut, bool* p_selected, bool enabled = true); // return true when activated + toggle (*p_selected) if p_selected != NULL