mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-09-01 10:59:12 +00:00
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.
This commit is contained in:
@@ -102,7 +102,7 @@ static TileIndex GetReferenceTile(NewsReferenceType reftype, uint32_t ref)
|
|||||||
static constexpr NWidgetPart _nested_normal_news_widgets[] = {
|
static constexpr NWidgetPart _nested_normal_news_widgets[] = {
|
||||||
NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL),
|
NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL),
|
||||||
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel),
|
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel),
|
||||||
NWidget(NWID_LAYER),
|
NWidget(NWID_LAYER, INVALID_COLOUR),
|
||||||
/* Layer 1 */
|
/* Layer 1 */
|
||||||
NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1),
|
NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1),
|
||||||
NWidget(NWID_HORIZONTAL), SetPIPRatio(0, 1, 0),
|
NWidget(NWID_HORIZONTAL), SetPIPRatio(0, 1, 0),
|
||||||
@@ -134,7 +134,7 @@ static WindowDesc _normal_news_desc(
|
|||||||
static constexpr NWidgetPart _nested_vehicle_news_widgets[] = {
|
static constexpr NWidgetPart _nested_vehicle_news_widgets[] = {
|
||||||
NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL),
|
NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL),
|
||||||
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel),
|
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel),
|
||||||
NWidget(NWID_LAYER),
|
NWidget(NWID_LAYER, INVALID_COLOUR),
|
||||||
/* Layer 1 */
|
/* Layer 1 */
|
||||||
NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1),
|
NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1),
|
||||||
NWidget(NWID_HORIZONTAL), SetPIPRatio(0, 1, 0),
|
NWidget(NWID_HORIZONTAL), SetPIPRatio(0, 1, 0),
|
||||||
@@ -181,7 +181,7 @@ static WindowDesc _vehicle_news_desc(
|
|||||||
static constexpr NWidgetPart _nested_company_news_widgets[] = {
|
static constexpr NWidgetPart _nested_company_news_widgets[] = {
|
||||||
NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL),
|
NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL),
|
||||||
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel),
|
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel),
|
||||||
NWidget(NWID_LAYER),
|
NWidget(NWID_LAYER, INVALID_COLOUR),
|
||||||
/* Layer 1 */
|
/* Layer 1 */
|
||||||
NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1),
|
NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1),
|
||||||
NWidget(NWID_HORIZONTAL), SetPIPRatio(0, 1, 0),
|
NWidget(NWID_HORIZONTAL), SetPIPRatio(0, 1, 0),
|
||||||
@@ -225,7 +225,7 @@ static WindowDesc _company_news_desc(
|
|||||||
static constexpr NWidgetPart _nested_thin_news_widgets[] = {
|
static constexpr NWidgetPart _nested_thin_news_widgets[] = {
|
||||||
NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL),
|
NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL),
|
||||||
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel),
|
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel),
|
||||||
NWidget(NWID_LAYER),
|
NWidget(NWID_LAYER, INVALID_COLOUR),
|
||||||
/* Layer 1 */
|
/* Layer 1 */
|
||||||
NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1),
|
NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1),
|
||||||
NWidget(NWID_HORIZONTAL), SetPIPRatio(0, 1, 0),
|
NWidget(NWID_HORIZONTAL), SetPIPRatio(0, 1, 0),
|
||||||
|
Reference in New Issue
Block a user