1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-22 04:32:47 +01:00

Codechange: WWT_TEXT, WWT_LABEL and WWT_EMPTY don't use colour. (#13218)

Set colour for these widget types to INVALID_COLOUR to avoid giving the impression that the colour has a purpose.

A runtime exception is added to catch this the existing widget unit test.
This commit is contained in:
Peter Nelson
2025-01-01 15:38:19 +00:00
committed by GitHub
parent b1cac3c1a9
commit 98e980c478
28 changed files with 222 additions and 217 deletions

View File

@@ -412,13 +412,13 @@ static constexpr NWidgetPart _nested_select_game_widgets[] = {
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SGI_BASESET_SELECTION),
NWidget(NWID_VERTICAL),
NWidget(WWT_EMPTY, COLOUR_ORANGE, WID_SGI_BASESET), SetFill(1, 0),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SGI_BASESET), SetFill(1, 0),
EndContainer(),
EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SGI_TRANSLATION_SELECTION),
NWidget(NWID_VERTICAL),
NWidget(WWT_EMPTY, COLOUR_ORANGE, WID_SGI_TRANSLATION), SetFill(1, 0),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SGI_TRANSLATION), SetFill(1, 0),
EndContainer(),
EndContainer(),