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

Method OnInit

src/station_gui.cpp:1340–1345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1338 }
1339
1340 void OnInit() override
1341 {
1342 this->cargo_icon_size = GetLargestCargoIconSize();
1343 this->line_height = std::max<int>(GetCharacterHeight(FS_NORMAL), this->cargo_icon_size.height);
1344 this->expand_shrink_width = std::max(GetCharacterWidth(FS_NORMAL, '-'), GetCharacterWidth(FS_NORMAL, '+'));
1345 }
1346
1347 void Close([[maybe_unused]] int data = 0) override
1348 {

Callers

nothing calls this directly

Calls 3

GetLargestCargoIconSizeFunction · 0.85
GetCharacterHeightFunction · 0.85
GetCharacterWidthFunction · 0.85

Tested by

no test coverage detected