1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 14:02:59 +01:00

Make rct_windowclass strong type WindowClass

This already revealed some places where implicit conversions were done, including some where its use was nonsense (MouseInput.cpp).
The changes to the Intent class were necessary to keep things working, and this splits things up more neatly.
This commit is contained in:
Hielke Morsink
2022-08-21 18:38:25 +02:00
committed by GitHub
parent ebe38a91ce
commit 7f29e4e39c
145 changed files with 1331 additions and 1235 deletions

View File

@@ -274,7 +274,7 @@ void InGameConsole::Draw(rct_drawpixelinfo* dpi) const
return;
// Set font
uint8_t textColour = NOT_TRANSLUCENT(ThemeGetColour(WC_CONSOLE, 1));
uint8_t textColour = NOT_TRANSLUCENT(ThemeGetColour(WindowClass::Console, 1));
const int32_t lineHeight = InGameConsoleGetLineHeight();
const int32_t maxLines = GetNumVisibleLines();
@@ -304,7 +304,7 @@ void InGameConsole::Draw(rct_drawpixelinfo* dpi) const
FilterPaletteID::Palette51);
// Paint background colour.
uint8_t backgroundColour = ThemeGetColour(WC_CONSOLE, 0);
uint8_t backgroundColour = ThemeGetColour(WindowClass::Console, 0);
gfx_fill_rect_inset(dpi, { _consoleTopLeft, _consoleBottomRight }, backgroundColour, INSET_RECT_FLAG_FILL_NONE);
gfx_fill_rect_inset(
dpi, { _consoleTopLeft + ScreenCoordsXY{ 1, 1 }, _consoleBottomRight - ScreenCoordsXY{ 1, 1 } }, backgroundColour,