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

Method OnPlaceObjectAbort

src/dock_gui.cpp:281–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279 }
280
281 void OnPlaceObjectAbort() override
282 {
283 if (_game_mode != GM_EDITOR && this->IsWidgetLowered(WID_DT_STATION)) SetViewportCatchmentStation(nullptr, true);
284
285 this->RaiseButtons();
286
287 CloseWindowById(WC_BUILD_STATION, TRANSPORT_WATER);
288 CloseWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER);
289 CloseWindowById(WC_SELECT_STATION, 0);
290 CloseWindowByClass(WC_BUILD_BRIDGE);
291 }
292
293 void OnPlacePresize([[maybe_unused]] Point pt, TileIndex tile_from) override
294 {

Callers

nothing calls this directly

Calls 5

CloseWindowByIdFunction · 0.85
CloseWindowByClassFunction · 0.85
IsWidgetLoweredMethod · 0.80
RaiseButtonsMethod · 0.80

Tested by

no test coverage detected