1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 15:24:30 +01:00

Close #15660: Allow showing window buttons on the left (#20176)

This commit is contained in:
Michael Steenbeek
2023-05-19 10:17:38 +02:00
committed by GitHub
parent e1f7b240da
commit 5e495d63c7
53 changed files with 238 additions and 50 deletions

View File

@@ -49,7 +49,7 @@ namespace OpenRCT2::Ui::Windows
static Widget CustomDefaultWidgets[] = {
{ WindowWidgetType::Frame, 0, 0, 0, 0, 0, 0xFFFFFFFF, STR_NONE }, // panel / background
{ WindowWidgetType::Caption, 0, 1, 0, 1, 14, STR_STRING, STR_WINDOW_TITLE_TIP }, // title bar
{ WindowWidgetType::Caption, 0, 0, 0, 1, 14, STR_STRING, STR_WINDOW_TITLE_TIP }, // title bar
{ WindowWidgetType::CloseBox, 0, 0, 0, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close x button
{ WindowWidgetType::Resize, 1, 0, 0, 14, 0, 0xFFFFFFFF, STR_NONE }, // content panel
};
@@ -476,13 +476,9 @@ namespace OpenRCT2::Ui::Windows
void OnPrepareDraw() override
{
widgets[WIDX_BACKGROUND].right = width - 1;
widgets[WIDX_BACKGROUND].bottom = height - 1;
widgets[WIDX_TITLE].right = width - 2;
widgets[WIDX_CLOSE].left = width - 13;
widgets[WIDX_CLOSE].right = width - 3;
widgets[WIDX_CONTENT_PANEL].right = width - 1;
widgets[WIDX_CONTENT_PANEL].bottom = height - 1;
// This has to be called to ensure the window frame is correctly initialised - not doing this will
// cause an assertion to be hit.
ResizeFrameWithPage();
widgets[WIDX_CLOSE].text = (colours[0] & COLOUR_FLAG_TRANSLUCENT) ? STR_CLOSE_X_WHITE : STR_CLOSE_X;
// Having the content panel visible for transparent windows makes the borders darker than they should be