mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-25 15:54:31 +01:00
Close #20157: Hide FPS Counter if top toolbar is hidden
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
- Improved: [#21855] Add a separator between “Load Game” and “Save Game”, to avoid accidental overwriting.
|
||||
- Change: [#21715] [Plugin] Remove access to the internal `owner` property. Note: `ownership` is still accessible.
|
||||
- Change: [#21855] Cheats menu dropdown no longer requires dragging.
|
||||
- Change: [#21866] Hide the FPS Counter when the top toolbar/widgets have been toggled off.
|
||||
- Fix: [#866] Boat Hire boats get stuck entering track (original bug).
|
||||
- Fix: [#10701] No reason specified when placing door over unsuitable track.
|
||||
- Fix: [#18723, #21870] Attempting to demolish a flat ride in pause mode allows you to place multiple copies.
|
||||
|
||||
@@ -103,8 +103,22 @@ void Painter::PaintReplayNotice(DrawPixelInfo& dpi, const char* text)
|
||||
GfxSetDirtyBlocks({ screenCoords, screenCoords + ScreenCoordsXY{ stringWidth, 16 } });
|
||||
}
|
||||
|
||||
static bool ShouldShowFPS()
|
||||
{
|
||||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO && !TitleShouldHideVersionInfo())
|
||||
return true;
|
||||
|
||||
if (!WindowFindByClass(WindowClass::TopToolbar))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Painter::PaintFPS(DrawPixelInfo& dpi)
|
||||
{
|
||||
if (!ShouldShowFPS())
|
||||
return;
|
||||
|
||||
ScreenCoordsXY screenCoords(_uiContext->GetWidth() / 2, 2);
|
||||
|
||||
MeasureFPS();
|
||||
|
||||
Reference in New Issue
Block a user