1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-25 13:14:19 +01:00

Codechange: split widget_data into its actual components

This commit is contained in:
Rubidium
2025-01-02 13:33:24 +01:00
committed by rubidium42
parent df6e2d7aa4
commit 99d790c4bb
5 changed files with 61 additions and 57 deletions

View File

@@ -2194,7 +2194,7 @@ static std::unique_ptr<NWidgetBase> MakeMainToolbar()
hor->Add(std::make_unique<NWidgetSpacer>(0, 0));
break;
}
auto leaf = std::make_unique<NWidgetLeaf>(i == WID_TN_SAVE ? WWT_IMGBTN_2 : WWT_IMGBTN, COLOUR_GREY, i, toolbar_button_sprites[i], STR_TOOLBAR_TOOLTIP_PAUSE_GAME + i);
auto leaf = std::make_unique<NWidgetLeaf>(i == WID_TN_SAVE ? WWT_IMGBTN_2 : WWT_IMGBTN, COLOUR_GREY, i, WidgetData{.sprite = toolbar_button_sprites[i]}, STR_TOOLBAR_TOOLTIP_PAUSE_GAME + i);
leaf->SetMinimalSize(20, 20);
hor->Add(std::move(leaf));
}