Skip to content

Commit

Permalink
ShowThemeTweakGui: can show demo window
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Jun 18, 2024
1 parent d774b2b commit 6c8f21e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hello_imgui/impl/hello_imgui_theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
8 changes: 7 additions & 1 deletion src/hello_imgui/impl/imgui_theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@ namespace ImGuiTheme

bool _ShowTweakGui(ImGuiThemeTweaks* tweaks)
{
ImGui::SeparatorText("Main tweaks");
bool changed = false;
{
bool active = tweaks->AlphaMultiplier >= 0;
Expand All @@ -1056,7 +1057,6 @@ namespace ImGuiTheme
tweaks->AlphaMultiplier = -1.f;
}

ImGui::Separator();
{
bool active = tweaks->Rounding >= 0;
if (ImGui::Checkbox("Rounding / all widgets", &active))
Expand Down Expand Up @@ -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"))
Expand Down

0 comments on commit 6c8f21e

Please sign in to comment.