Skip to content

Commit

Permalink
chore: imgui improvements (#618)
Browse files Browse the repository at this point in the history
* chore: imgui improvements

* style: 🎨 apply clang-format changes

---------

Co-authored-by: doodlum <doodlum@users.noreply.github.com>
  • Loading branch information
doodlum and doodlum authored Oct 9, 2024
1 parent 6630d9c commit 8b0b2d8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void SetupImGuiStyle()

// Theme based on https://github.com/powerof3/DialogueHistory

float bgAlpha{ 0.52f };
float bgAlpha{ 0.34f };
float disabledAlpha{ 0.30f };
float hovoredAlpha{ 0.1f };

Expand Down Expand Up @@ -691,6 +691,13 @@ void Menu::DrawOverlay()
{
ProcessInputEventQueue(); //Synchronize Inputs to frame

auto& shaderCache = SIE::ShaderCache::Instance();
auto failed = shaderCache.GetFailedTasks();
auto hide = shaderCache.IsHideErrors();

if (!(shaderCache.IsCompiling() || IsEnabled || inTestMode || (failed && !hide)))
return;

// Start the Dear ImGui frame
ImGui_ImplDX11_NewFrame();
ImGui_ImplWin32_NewFrame();
Expand All @@ -699,15 +706,11 @@ void Menu::DrawOverlay()
uint64_t totalShaders = 0;
uint64_t compiledShaders = 0;

auto& shaderCache = SIE::ShaderCache::Instance();

compiledShaders = shaderCache.GetCompletedTasks();
totalShaders = shaderCache.GetTotalTasks();

auto state = State::GetSingleton();

auto failed = shaderCache.GetFailedTasks();
auto hide = shaderCache.IsHideErrors();
auto progressTitle = fmt::format("{}Compiling Shaders: {}",
shaderCache.backgroundCompilation ? "Background " : "",
shaderCache.GetShaderStatsString(!state->IsDeveloperMode()).c_str());
Expand Down

0 comments on commit 8b0b2d8

Please sign in to comment.