WIP Menus: menu bars. Still inconsistency with hovering scheme. Will probably follow what Windows does. (#126).

This commit is contained in:
ocornut
2015-05-17 17:13:45 +01:00
parent e0594340ff
commit f2b738648f
2 changed files with 87 additions and 13 deletions

View File

@ -363,6 +363,8 @@ namespace ImGui
// Widgets: Menus
// FIXME-WIP: v1.39 in development, API *WILL* change
IMGUI_API bool BeginMenuBar();
IMGUI_API void EndMenuBar();
IMGUI_API bool BeginMenu(const char* label);
IMGUI_API void EndMenu();
IMGUI_API bool MenuItem(const char* label, const char* shortcut = NULL, bool selected = false); // bool enabled = true
@ -456,6 +458,7 @@ enum ImGuiWindowFlags_
ImGuiWindowFlags_AlwaysAutoResize = 1 << 6, // Resize every window to its content every frame
ImGuiWindowFlags_ShowBorders = 1 << 7, // Show borders around windows and items
ImGuiWindowFlags_NoSavedSettings = 1 << 8, // Never load/save settings in .ini file
ImGuiWindowFlags_MenuBar = 1 << 9, // Has a menubar
// [Internal]
ImGuiWindowFlags_ChildWindow = 1 << 20, // Don't use! For internal use by BeginChild()
ImGuiWindowFlags_ChildWindowAutoFitX = 1 << 21, // Don't use! For internal use by BeginChild()
@ -520,6 +523,7 @@ enum ImGuiCol_
ImGuiCol_FrameBgActive,
ImGuiCol_TitleBg,
ImGuiCol_TitleBgCollapsed,
ImGuiCol_MenuBarBg,
ImGuiCol_ScrollbarBg,
ImGuiCol_ScrollbarGrab,
ImGuiCol_ScrollbarGrabHovered,