Make the info overlay position fixed (bottom left)
PiperOrigin-RevId: 935868629 Change-Id: I26b8d50f276b05c9869ea0f6cc5c3033ab6ef2f9
This commit is contained in:
committed by
Copybara-Service
parent
d5db39c762
commit
bf59ca6a1b
@@ -936,8 +936,21 @@ void App::BuildGui() {
|
|||||||
|
|
||||||
if (tmp_.stats) {
|
if (tmp_.stats) {
|
||||||
platform::ScopedStyle style;
|
platform::ScopedStyle style;
|
||||||
style.Var(ImGuiStyleVar_Alpha, 0.6f);
|
style.Var(ImGuiStyleVar_Alpha, 0.8f);
|
||||||
if (ImGui::Begin("Info", &tmp_.stats)) {
|
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();
|
const float fps = renderer_->GetFps();
|
||||||
platform::StatsGui(
|
platform::StatsGui(
|
||||||
model(), data(),
|
model(), data(),
|
||||||
|
|||||||
Reference in New Issue
Block a user