1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 07:43:01 +01:00

Create function to resize window frame

This commit is contained in:
Michael Steenbeek
2022-11-06 10:29:40 +01:00
committed by GitHub
parent 22a2d11cfc
commit 27f3a3a796
24 changed files with 50 additions and 170 deletions

View File

@@ -2238,3 +2238,23 @@ void WidgetScrollUpdateThumbs(rct_window& w, WidgetIndex widget_index)
}
}
}
void rct_window::ResizeFrame()
{
// Frame
widgets[0].right = width - 1;
widgets[0].bottom = height - 1;
// Title
widgets[1].right = width - 2;
// Close button
widgets[2].left = width - 13;
widgets[2].right = width - 3;
}
void rct_window::ResizeFrameWithPage()
{
ResizeFrame();
// Page background
widgets[3].right = width - 1;
widgets[3].bottom = height - 1;
}