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
+1 -1
View File
@@ -480,7 +480,7 @@ static constexpr NWidgetPart _nested_scen_edit_land_gen_widgets[] = {
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_SPACER), SetFill(1, 0),
NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_ETT_DOTS), SetMinimalSize(59, 31), SetDataTip(STR_EMPTY, STR_NULL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_ETT_DOTS), SetMinimalSize(59, 31), SetDataTip(STR_EMPTY, STR_NULL),
NWidget(NWID_SPACER), SetFill(1, 0),
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetFill(0, 1),