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

Method OnInit

src/industry_gui.cpp:399–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397 }
398
399 void OnInit() override
400 {
401 this->badge_classes = GUIBadgeClasses{GSF_INDUSTRIES};
402
403 /* Width of the legend blob -- slightly larger than the smallmap legend blob. */
404 this->legend.height = GetCharacterHeight(FS_SMALL);
405 this->legend.width = this->legend.height * 9 / 6;
406
407 this->SetupArrays();
408 }
409
410 void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override
411 {

Callers

nothing calls this directly

Calls 2

SetupArraysMethod · 0.95
GetCharacterHeightFunction · 0.85

Tested by

no test coverage detected