1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 08:45:00 +01:00

Merge pull request #24288 from AaronVanGeffen/close-buttons

Generalise white close button strings to all translucent title bars
This commit is contained in:
Aaron van Geffen
2025-04-26 11:30:29 +02:00
committed by GitHub
parent aeeaaa6f1b
commit 7e9cc6df5d
9 changed files with 20 additions and 20 deletions

View File

@@ -486,11 +486,12 @@ namespace OpenRCT2::Ui::Windows
void OnPrepareDraw() override
{
bool useWhite = colours[0].hasFlag(ColourFlag::translucent);
auto& closeButton = widgets[WIDX_CLOSE];
bool translucent = colours[closeButton.colour].hasFlag(ColourFlag::translucent);
if (Config::Get().interface.EnlargedUi)
widgets[WIDX_CLOSE].string = !useWhite ? kCloseBoxStringBlackLarge : kCloseBoxStringWhiteLarge;
closeButton.string = !translucent ? kCloseBoxStringBlackLarge : kCloseBoxStringWhiteLarge;
else
widgets[WIDX_CLOSE].string = !useWhite ? kCloseBoxStringBlackNormal : kCloseBoxStringWhiteNormal;
closeButton.string = !translucent ? kCloseBoxStringBlackNormal : kCloseBoxStringWhiteNormal;
// Having the content panel visible for transparent windows makes the borders darker than they should be
// For now just hide it if there are no tabs and the window is not resizable