From 183779c4a25848498fb84b0a677bcf9888554630 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Wed, 22 Jan 2025 20:43:54 +0000 Subject: [PATCH] Codefix: Incorrect NWidgetPart type for NWID_LAYER. (#13357) Due to function overloads and default parameters, the wrong `NWidget()` function was called, resulting resulting in the wrong `NWidgetPart` being created. --- src/news_gui.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 1342d99d6d..a19277ed0d 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -102,7 +102,7 @@ static TileIndex GetReferenceTile(NewsReferenceType reftype, uint32_t ref) static constexpr NWidgetPart _nested_normal_news_widgets[] = { NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL), NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel), - NWidget(NWID_LAYER), + NWidget(NWID_LAYER, INVALID_COLOUR), /* Layer 1 */ NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1), NWidget(NWID_HORIZONTAL), SetPIPRatio(0, 1, 0), @@ -134,7 +134,7 @@ static WindowDesc _normal_news_desc( static constexpr NWidgetPart _nested_vehicle_news_widgets[] = { NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL), NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel), - NWidget(NWID_LAYER), + NWidget(NWID_LAYER, INVALID_COLOUR), /* Layer 1 */ NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1), NWidget(NWID_HORIZONTAL), SetPIPRatio(0, 1, 0), @@ -181,7 +181,7 @@ static WindowDesc _vehicle_news_desc( static constexpr NWidgetPart _nested_company_news_widgets[] = { NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL), NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel), - NWidget(NWID_LAYER), + NWidget(NWID_LAYER, INVALID_COLOUR), /* Layer 1 */ NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1), NWidget(NWID_HORIZONTAL), SetPIPRatio(0, 1, 0), @@ -225,7 +225,7 @@ static WindowDesc _company_news_desc( static constexpr NWidgetPart _nested_thin_news_widgets[] = { NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL), NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel), - NWidget(NWID_LAYER), + NWidget(NWID_LAYER, INVALID_COLOUR), /* Layer 1 */ NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1), NWidget(NWID_HORIZONTAL), SetPIPRatio(0, 1, 0),