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

Method OnInit

src/depot_gui.cpp:676–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

674 }
675
676 void OnInit() override
677 {
678 this->cell_size = GetVehicleImageCellSize(this->type, EIT_IN_DEPOT);
679 this->flag_size = maxdim(GetScaledSpriteSize(SPR_FLAG_VEH_STOPPED), GetScaledSpriteSize(SPR_FLAG_VEH_RUNNING));
680 }
681
682 void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override
683 {

Callers

nothing calls this directly

Calls 3

GetVehicleImageCellSizeFunction · 0.85
maxdimFunction · 0.85
GetScaledSpriteSizeFunction · 0.85

Tested by

no test coverage detected