Make the info overlay position fixed (bottom left)

PiperOrigin-RevId: 935868629
Change-Id: I26b8d50f276b05c9869ea0f6cc5c3033ab6ef2f9
This commit is contained in:
Yuval Tassa
2026-06-21 23:39:14 -07:00
committed by Copybara-Service
parent d5db39c762
commit bf59ca6a1b
+15 -2
View File
@@ -936,8 +936,21 @@ void App::BuildGui() {
if (tmp_.stats) {
platform::ScopedStyle style;
style.Var(ImGuiStyleVar_Alpha, 0.6f);
if (ImGui::Begin("Info", &tmp_.stats)) {
style.Var(ImGuiStyleVar_Alpha, 0.8f);
const float scale = ImGui::GetWindowDpiScale();
ImGui::SetNextWindowPos(
ImVec2(workspace_rect.x,
workspace_rect.y + workspace_rect.w),
ImGuiCond_Always, ImVec2(0.0f, 1.0f));
ImGui::SetNextWindowSizeConstraints(ImVec2(240.0f * scale, -1.0f),
ImVec2(FLT_MAX, -1.0f));
const ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar |
ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoMove |
ImGuiWindowFlags_NoCollapse |
ImGuiWindowFlags_AlwaysAutoResize |
ImGuiWindowFlags_NoSavedSettings;
if (ImGui::Begin("Info", nullptr, flags)) {
const float fps = renderer_->GetFps();
platform::StatsGui(
model(), data(),