MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / DemoWindowMenuBar

Function DemoWindowMenuBar

3rdparty/imgui/src/imgui_demo.cpp:665–734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

663//-----------------------------------------------------------------------------
664
665static void DemoWindowMenuBar(ImGuiDemoWindowData* demo_data)
666{
667 if (ImGui::BeginMenuBar())
668 {
669 if (ImGui::BeginMenu("Menu"))
670 {
671 IMGUI_DEMO_MARKER("Menu/File");
672 ShowExampleMenuFile();
673 ImGui::EndMenu();
674 }
675 if (ImGui::BeginMenu("Examples"))
676 {
677 IMGUI_DEMO_MARKER("Menu/Examples");
678 ImGui::MenuItem("Main menu bar", NULL, &demo_data->ShowMainMenuBar);
679
680 ImGui::SeparatorText("Mini apps");
681 ImGui::MenuItem("Assets Browser", NULL, &demo_data->ShowAppAssetsBrowser);
682 ImGui::MenuItem("Console", NULL, &demo_data->ShowAppConsole);
683 ImGui::MenuItem("Custom rendering", NULL, &demo_data->ShowAppCustomRendering);
684 ImGui::MenuItem("Documents", NULL, &demo_data->ShowAppDocuments);
685 ImGui::MenuItem("Image Viewer", NULL, &demo_data->ShowAppImageViewer);
686 ImGui::MenuItem("Log", NULL, &demo_data->ShowAppLog);
687 ImGui::MenuItem("Property editor", NULL, &demo_data->ShowAppPropertyEditor);
688 ImGui::MenuItem("Simple layout", NULL, &demo_data->ShowAppLayout);
689 ImGui::MenuItem("Simple overlay", NULL, &demo_data->ShowAppSimpleOverlay);
690
691 ImGui::SeparatorText("Concepts");
692 ImGui::MenuItem("Auto-resizing window", NULL, &demo_data->ShowAppAutoResize);
693 ImGui::MenuItem("Constrained-resizing window", NULL, &demo_data->ShowAppConstrainedResize);
694 ImGui::MenuItem("Fullscreen window", NULL, &demo_data->ShowAppFullscreen);
695 ImGui::MenuItem("Long text display", NULL, &demo_data->ShowAppLongText);
696 ImGui::MenuItem("Manipulating window titles", NULL, &demo_data->ShowAppWindowTitles);
697
698 ImGui::EndMenu();
699 }
700 //if (ImGui::MenuItem("MenuItem")) {} // You can also use MenuItem() inside a menu bar!
701 if (ImGui::BeginMenu("Tools"))
702 {
703 IMGUI_DEMO_MARKER("Menu/Tools");
704 ImGuiIO& io = ImGui::GetIO();
705#ifndef IMGUI_DISABLE_DEBUG_TOOLS
706 const bool has_debug_tools = true;
707#else
708 const bool has_debug_tools = false;
709#endif
710 ImGui::MenuItem("Metrics/Debugger", NULL, &demo_data->ShowMetrics, has_debug_tools);
711 if (ImGui::BeginMenu("Debug Options"))
712 {
713 ImGui::BeginDisabled(!has_debug_tools);
714 ImGui::Checkbox("Highlight ID Conflicts", &io.ConfigDebugHighlightIdConflicts);
715 ImGui::EndDisabled();
716 ImGui::Checkbox("Assert on error recovery", &io.ConfigErrorRecoveryEnableAssert);
717 ImGui::TextDisabled("(see Demo->Configuration for more)");
718 ImGui::EndMenu();
719 }
720 ImGui::MenuItem("Debug Log", NULL, &demo_data->ShowDebugLog, has_debug_tools);
721 ImGui::MenuItem("ID Stack Tool", NULL, &demo_data->ShowIDStackTool, has_debug_tools);
722 bool is_debugger_present = io.ConfigDebugIsDebuggerPresent;

Callers 1

ShowDemoWindowMethod · 0.85

Calls 1

ShowExampleMenuFileFunction · 0.85

Tested by

no test coverage detected