mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Added a gratuitous About window
This commit is contained in:
parent
f7f71043ca
commit
1266e4a181
1 changed files with 16 additions and 1 deletions
17
imgui.cpp
17
imgui.cpp
|
|
@ -11176,6 +11176,7 @@ void ImGui::ShowTestWindow(bool* opened)
|
|||
static bool show_app_fixed_overlay = false;
|
||||
static bool show_app_custom_rendering = false;
|
||||
static bool show_app_manipulating_window_title = false;
|
||||
static bool show_app_about = false;
|
||||
if (show_app_metrics) ImGui::ShowMetricsWindow(&show_app_metrics);
|
||||
if (show_app_main_menu_bar) ShowExampleAppMainMenuBar();
|
||||
if (show_app_console) ShowExampleAppConsole(&show_app_console);
|
||||
|
|
@ -11185,6 +11186,15 @@ void ImGui::ShowTestWindow(bool* opened)
|
|||
if (show_app_fixed_overlay) ShowExampleAppFixedOverlay(&show_app_fixed_overlay);
|
||||
if (show_app_manipulating_window_title) ShowExampleAppManipulatingWindowTitle(&show_app_manipulating_window_title);
|
||||
if (show_app_custom_rendering) ShowExampleAppCustomRendering(&show_app_custom_rendering);
|
||||
if (show_app_about)
|
||||
{
|
||||
ImGui::Begin("About ImGui", &show_app_about, ImGuiWindowFlags_AlwaysAutoResize);
|
||||
ImGui::Text("ImGui %s", ImGui::GetVersion());
|
||||
ImGui::Separator();
|
||||
ImGui::Text("By Omar Cornut and all github contributors.");
|
||||
ImGui::Text("ImGui is licensed under the MIT License, see LICENSE for more information.");
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
static bool no_titlebar = false;
|
||||
static bool no_border = true;
|
||||
|
|
@ -11226,7 +11236,6 @@ void ImGui::ShowTestWindow(bool* opened)
|
|||
}
|
||||
if (ImGui::BeginMenu("Examples"))
|
||||
{
|
||||
ImGui::MenuItem("Metrics", NULL, &show_app_metrics);
|
||||
ImGui::MenuItem("Main menu bar", NULL, &show_app_main_menu_bar);
|
||||
ImGui::MenuItem("Console", NULL, &show_app_console);
|
||||
ImGui::MenuItem("Simple layout", NULL, &show_app_layout);
|
||||
|
|
@ -11237,6 +11246,12 @@ void ImGui::ShowTestWindow(bool* opened)
|
|||
ImGui::MenuItem("Custom rendering", NULL, &show_app_custom_rendering);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
if (ImGui::BeginMenu("Help"))
|
||||
{
|
||||
ImGui::MenuItem("Metrics", NULL, &show_app_metrics);
|
||||
ImGui::MenuItem("About ImGui", NULL, &show_app_about);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
ImGui::EndMenuBar();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue