demo_themes.cpp 902 B

123456789101112131415161718192021222324
  1. // Demo for ImGui theming using ImGui Bundle.
  2. //
  3. // In order to apply a theme, you can use:
  4. // =======================================
  5. // ImGuiTheme::ApplyTheme(ImGuiTheme::ImGuiTheme_Cherry)
  6. // Part of ImGui Bundle - MIT License - Copyright (c) 2022-2026 Pascal Thomet - https://github.com/pthom/imgui_bundle
  7. #include "imgui_md_wrapper/imgui_md_wrapper.h"
  8. #include "hello_imgui/hello_imgui.h"
  9. void demo_themes()
  10. {
  11. ImGuiMd::RenderUnindented(R"(
  12. # Theming
  13. HelloImGui adds support for advanced theming to ImGui. Select the menu View/Theme/Theme tweak window to explore all the themes and their customization.
  14. )");
  15. ImGui::NewLine();
  16. auto & tweakedTheme = HelloImGui::GetRunnerParams()->imGuiWindowParams.tweakedTheme;
  17. bool themeChanged = ImGuiTheme::ShowThemeTweakGui(&tweakedTheme);
  18. if (themeChanged)
  19. ImGuiTheme::ApplyTweakedTheme(tweakedTheme);
  20. }