1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 23:33:04 +01:00

Implement custom window tabs

This commit is contained in:
Ted John
2020-04-30 20:32:39 +01:00
parent 8798811561
commit 4501173c0d
7 changed files with 378 additions and 58 deletions

View File

@@ -1317,8 +1317,8 @@ void window_set_resize(rct_window* w, int32_t minWidth, int32_t minHeight, int32
w->max_height = maxHeight;
// Clamp width and height to minimum and maximum
int32_t width = std::clamp<int32_t>(w->width, minWidth, maxWidth);
int32_t height = std::clamp<int32_t>(w->height, minHeight, maxHeight);
int32_t width = std::clamp<int32_t>(w->width, std::min(minWidth, maxWidth), std::max(minWidth, maxWidth));
int32_t height = std::clamp<int32_t>(w->height, std::min(minHeight, maxHeight), std::max(minHeight, maxHeight));
// Resize window if size has changed
if (w->width != width || w->height != height)