Added mMainWindowStyles variable to Application.

This commit is contained in:
Patrick Wuttke
2025-09-19 13:53:24 +02:00
parent d74474a042
commit 7470878f9c
2 changed files with 12 additions and 0 deletions

View File

@@ -96,8 +96,16 @@ int Application::run(int argc, char** argv)
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->Pos);
ImGui::SetNextWindowSize(ImGui::GetMainViewport()->Size);
ImGui::SetNextWindowViewport(ImGui::GetMainViewport()->ID);
for (const auto& [variable, value] : mMainWindowStyles) {
std::visit([&](auto val) {
ImGui::PushStyleVar(variable, val);
}, value);
}
ImGui::Begin("##main", nullptr, mMainWindowFlags);
ImGui::PopStyleVar(static_cast<int>(mMainWindowStyles.size()));
render();
mTaskLoop.tick();