From 6c8f21e5b0ada2355e02727e3ab9f6a84f0e5298 Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Tue, 18 Jun 2024 18:22:23 +0200 Subject: [PATCH] ShowThemeTweakGui: can show demo window --- src/hello_imgui/impl/hello_imgui_theme.cpp | 2 +- src/hello_imgui/impl/imgui_theme.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/hello_imgui/impl/hello_imgui_theme.cpp b/src/hello_imgui/impl/hello_imgui_theme.cpp index a0a30795..ecafc166 100644 --- a/src/hello_imgui/impl/hello_imgui_theme.cpp +++ b/src/hello_imgui/impl/hello_imgui_theme.cpp @@ -8,7 +8,7 @@ namespace HelloImGui { if (gShowTweakWindow) { - ImGui::SetNextWindowSize(ImVec2(600.f, 600.f), ImGuiCond_FirstUseEver); + ImGui::SetNextWindowSize(ImVec2(600.f, 750.f), ImGuiCond_FirstUseEver); if (ImGui::Begin("Theme Tweaks", &gShowTweakWindow)) { if (ImGuiTheme::ShowThemeTweakGui(&tweakedTheme)) diff --git a/src/hello_imgui/impl/imgui_theme.cpp b/src/hello_imgui/impl/imgui_theme.cpp index 590c0535..91bbc4b9 100644 --- a/src/hello_imgui/impl/imgui_theme.cpp +++ b/src/hello_imgui/impl/imgui_theme.cpp @@ -1039,6 +1039,7 @@ namespace ImGuiTheme bool _ShowTweakGui(ImGuiThemeTweaks* tweaks) { + ImGui::SeparatorText("Main tweaks"); bool changed = false; { bool active = tweaks->AlphaMultiplier >= 0; @@ -1056,7 +1057,6 @@ namespace ImGuiTheme tweaks->AlphaMultiplier = -1.f; } - ImGui::Separator(); { bool active = tweaks->Rounding >= 0; if (ImGui::Checkbox("Rounding / all widgets", &active)) @@ -1189,6 +1189,12 @@ namespace ImGuiTheme bool ShowThemeTweakGui(ImGuiTweakedTheme *tweaked_theme) { bool changed = false; + + static bool showDemoWindow = false; + ImGui::Checkbox("Test on ImGui Demo Window", &showDemoWindow); + if (showDemoWindow) + ImGui::ShowDemoWindow(&showDemoWindow); + if (ImGui::BeginTabBar("Blah")) { if (ImGui::BeginTabItem("Theme Tweaks"))