mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-30 03:10:06 +00:00
Comments. Examples: added empty if (MenuItem()) {} statements in more places to better document the typical use cases (#126)
This commit is contained in:
parent
fdce095101
commit
0db122bc3b
2 changed files with 10 additions and 10 deletions
10
imgui.cpp
10
imgui.cpp
|
|
@ -11374,8 +11374,8 @@ static void ShowExampleAppMainMenuBar()
|
|||
static void ShowExampleMenuFile()
|
||||
{
|
||||
ImGui::MenuItem("(dummy menu)", NULL, false, false);
|
||||
ImGui::MenuItem("New");
|
||||
ImGui::MenuItem("Open", "Ctrl+O");
|
||||
if (ImGui::MenuItem("New")) {}
|
||||
if (ImGui::MenuItem("Open", "Ctrl+O")) {}
|
||||
if (ImGui::BeginMenu("Open Recent"))
|
||||
{
|
||||
ImGui::MenuItem("fish_hat.c");
|
||||
|
|
@ -11394,8 +11394,8 @@ static void ShowExampleMenuFile()
|
|||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
ImGui::MenuItem("Save", "Ctrl+S");
|
||||
ImGui::MenuItem("Save As..");
|
||||
if (ImGui::MenuItem("Save", "Ctrl+S")) {}
|
||||
if (ImGui::MenuItem("Save As..")) {}
|
||||
ImGui::Separator();
|
||||
if (ImGui::BeginMenu("Options"))
|
||||
{
|
||||
|
|
@ -11415,7 +11415,7 @@ static void ShowExampleMenuFile()
|
|||
ImGui::MenuItem(ImGui::GetStyleColName((ImGuiCol)i));
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
ImGui::MenuItem("Quit", "Alt+F4");
|
||||
if (ImGui::MenuItem("Quit", "Alt+F4")) {}
|
||||
}
|
||||
|
||||
static void ShowExampleAppAutoResize(bool* opened)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue