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

Method OnDropdownSelect

src/airport_gui.cpp:569–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

567 }
568
569 void OnDropdownSelect(WidgetID widget, int index, int) override
570 {
571 if (widget == WID_AP_CLASS_DROPDOWN) {
572 _selected_airport_class = (AirportClassID)index;
573 this->vscroll->SetCount(AirportClass::Get(_selected_airport_class)->GetSpecCount());
574 this->SelectFirstAvailableAirport(false);
575 }
576 }
577
578 void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
579 {

Callers

nothing calls this directly

Calls 3

GetSpecCountMethod · 0.80
SetCountMethod · 0.45

Tested by

no test coverage detected