| 1919 | } |
| 1920 | |
| 1921 | void ShowDemoWindow(bool* p_open) { |
| 1922 | static bool show_implot3d_metrics = false; |
| 1923 | static bool show_implot3d_style_editor = false; |
| 1924 | static bool show_implot3d_about = false; |
| 1925 | static bool show_imgui_metrics = false; |
| 1926 | static bool show_imgui_style_editor = false; |
| 1927 | static bool show_imgui_demo = false; |
| 1928 | |
| 1929 | if (show_implot3d_metrics) |
| 1930 | ImPlot3D::ShowMetricsWindow(&show_implot3d_metrics); |
| 1931 | if (show_implot3d_style_editor) { |
| 1932 | ImGui::Begin("Style Editor (ImPlot3D)", &show_implot3d_style_editor); |
| 1933 | ImPlot3D::ShowStyleEditor(); |
| 1934 | ImGui::End(); |
| 1935 | } |
| 1936 | if (show_implot3d_about) |
| 1937 | ImPlot3D::ShowAboutWindow(&show_implot3d_about); |
| 1938 | if (show_imgui_style_editor) { |
| 1939 | ImGui::Begin("Style Editor (ImGui)", &show_imgui_style_editor); |
| 1940 | ImGui::ShowStyleEditor(); |
| 1941 | ImGui::End(); |
| 1942 | } |
| 1943 | if (show_imgui_metrics) |
| 1944 | ImGui::ShowMetricsWindow(&show_imgui_metrics); |
| 1945 | if (show_imgui_demo) |
| 1946 | ImGui::ShowDemoWindow(&show_imgui_demo); |
| 1947 | |
| 1948 | ImGui::SetNextWindowPos(ImVec2(100, 100), ImGuiCond_FirstUseEver); |
| 1949 | ImGui::SetNextWindowSize(ImVec2(600, 750), ImGuiCond_FirstUseEver); |
| 1950 | ImGui::Begin("ImPlot3D Demo", p_open, ImGuiWindowFlags_MenuBar); |
| 1951 | if (ImGui::BeginMenuBar()) { |
| 1952 | if (ImGui::BeginMenu("Tools")) { |
| 1953 | ImGui::MenuItem("Metrics", nullptr, &show_implot3d_metrics); |
| 1954 | ImGui::MenuItem("Style Editor", nullptr, &show_implot3d_style_editor); |
| 1955 | ImGui::MenuItem("About ImPlot3D", nullptr, &show_implot3d_about); |
| 1956 | ImGui::Separator(); |
| 1957 | ImGui::MenuItem("ImGui Metrics", nullptr, &show_imgui_metrics); |
| 1958 | ImGui::MenuItem("ImGui Style Editor", nullptr, &show_imgui_style_editor); |
| 1959 | ImGui::MenuItem("ImGui Demo", nullptr, &show_imgui_demo); |
| 1960 | ImGui::EndMenu(); |
| 1961 | } |
| 1962 | ImGui::EndMenuBar(); |
| 1963 | } |
| 1964 | ShowAllDemos(); |
| 1965 | ImGui::End(); |
| 1966 | } |
| 1967 | |
| 1968 | //----------------------------------------------------------------------------- |
| 1969 | // [SECTION] Style Editor |
no test coverage detected