1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 18:25:16 +01:00

Introduce WindowBase::canBeResized

This commit is contained in:
Michael Steenbeek
2025-02-24 17:55:33 +01:00
committed by Gymnasiast
parent 8e1028f8a9
commit 87bb2f10dd
4 changed files with 9 additions and 14 deletions

View File

@@ -145,10 +145,7 @@ namespace OpenRCT2::Ui
// Draw the frame
GfxFillRectInset(dpi, { leftTop, { r, b } }, colour, press);
// Check if the window can be resized
if (!(w.flags & WF_RESIZABLE))
return;
if (w.min_width == w.max_width && w.min_height == w.max_height)
if (!w.canBeResized())
return;
// Draw the resize sprite at the bottom right corner
@@ -175,10 +172,7 @@ namespace OpenRCT2::Ui
// Draw the panel
GfxFillRectInset(dpi, { leftTop, { r, b } }, colour, 0);
// Check if the window can be resized
if (!(w.flags & WF_RESIZABLE))
return;
if (w.min_width == w.max_width && w.min_height == w.max_height)
if (!w.canBeResized())
return;
// Draw the resize sprite at the bottom right corner