1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 18:32:35 +01:00

Codechange: Allow all widget types to have a WidgetID index.

This commit is contained in:
Peter Nelson
2025-05-25 09:51:46 +01:00
committed by Peter Nelson
parent 31fbb17c5b
commit 82f5af7ecd
4 changed files with 41 additions and 93 deletions

View File

@@ -227,7 +227,7 @@ static constexpr NWidgetPart _nested_social_plugins_none_widgets[] = {
class NWidgetSocialPlugins : public NWidgetVertical {
public:
NWidgetSocialPlugins()
NWidgetSocialPlugins() : NWidgetVertical({}, WID_GO_SOCIAL_PLUGINS)
{
this->plugins = SocialIntegration::GetPlugins();
@@ -244,12 +244,6 @@ public:
this->SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0);
}
void FillWidgetLookup(WidgetLookup &widget_lookup) override
{
widget_lookup[WID_GO_SOCIAL_PLUGINS] = this;
NWidgetVertical::FillWidgetLookup(widget_lookup);
}
void SetupSmallestSize(Window *w) override
{
this->current_index = -1;