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

Method OnClick

src/airport_gui.cpp:124–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122 }
123
124 void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
125 {
126 switch (widget) {
127 case WID_AT_AIRPORT:
128 if (HandlePlacePushButton(this, WID_AT_AIRPORT, SPR_CURSOR_AIRPORT, HT_RECT)) {
129 ShowBuildAirportPicker(this);
130 this->last_user_action = widget;
131 }
132 break;
133
134 case WID_AT_DEMOLISH:
135 HandlePlacePushButton(this, WID_AT_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL);
136 this->last_user_action = widget;
137 break;
138
139 default: break;
140 }
141 }
142
143
144 void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override

Callers

nothing calls this directly

Calls 2

HandlePlacePushButtonFunction · 0.85
ShowBuildAirportPickerFunction · 0.85

Tested by

no test coverage detected