1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 09:14:58 +01:00

Reduce hardcoded positions for various windows

This commit is contained in:
Michael Steenbeek
2025-02-24 17:59:23 +01:00
committed by Gymnasiast
parent e0f9a33923
commit 9f343abdda
20 changed files with 132 additions and 107 deletions

View File

@@ -930,14 +930,13 @@ namespace OpenRCT2::Ui::Windows
widgets[WIDX_FILTER_RIDE_TAB_FRAME].right = widgets[WIDX_LIST].right;
widgets[WIDX_FILTER_TEXT_BOX].right = widgets[WIDX_LIST].right - 77;
widgets[WIDX_FILTER_TEXT_BOX].top = (hasSubTabs ? 79 : 48);
widgets[WIDX_FILTER_TEXT_BOX].bottom = (hasSubTabs ? 92 : 61);
auto contentStart = widgets[WIDX_TAB_CONTENT_PANEL].top;
widgets[WIDX_FILTER_TEXT_BOX].moveToY(contentStart + (hasSubTabs ? 36 : 5));
widgets[WIDX_FILTER_TEXT_BOX].string = _filter.data();
widgets[WIDX_FILTER_CLEAR_BUTTON].left = widgets[WIDX_LIST].right - 73;
widgets[WIDX_FILTER_CLEAR_BUTTON].right = widgets[WIDX_LIST].right;
widgets[WIDX_FILTER_CLEAR_BUTTON].top = (hasSubTabs ? 79 : 48);
widgets[WIDX_FILTER_CLEAR_BUTTON].bottom = (hasSubTabs ? 92 : 61);
widgets[WIDX_FILTER_CLEAR_BUTTON].moveToY(contentStart + (hasSubTabs ? 36 : 5));
// Toggle sub-tab visibility
const auto numSubTabs = static_cast<int8_t>(currentPage.subTabs.size());