MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / OnInit

Method OnInit

src/build_vehicle_gui.cpp:1332–1341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1330 }
1331
1332 void OnInit() override
1333 {
1334 this->badge_classes = GUIBadgeClasses(static_cast<GrfSpecFeature>(GSF_TRAINS + this->vehicle_type));
1335 this->SetCargoFilterArray();
1336
1337 this->badge_filters = AddBadgeDropdownFilters(this, WID_BV_BADGE_FILTER, WID_BV_BADGE_FILTER, COLOUR_GREY, static_cast<GrfSpecFeature>(GSF_TRAINS + this->vehicle_type));
1338
1339 this->widget_lookup.clear();
1340 this->nested_root->FillWidgetLookup(this->widget_lookup);
1341 }
1342
1343 /** Filter the engine list against the currently selected cargo filter */
1344 void FilterEngineList()

Callers

nothing calls this directly

Calls 5

SetCargoFilterArrayMethod · 0.95
GUIBadgeClassesClass · 0.85
AddBadgeDropdownFiltersFunction · 0.85
clearMethod · 0.45
FillWidgetLookupMethod · 0.45

Tested by

no test coverage detected