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

Method Close

src/rail_gui.cpp:452–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450 }
451
452 void Close([[maybe_unused]] int data = 0) override
453 {
454 if (this->IsWidgetLowered(WID_RAT_BUILD_STATION)) SetViewportCatchmentStation(nullptr, true);
455 if (this->IsWidgetLowered(WID_RAT_BUILD_WAYPOINT)) SetViewportCatchmentWaypoint(nullptr, true);
456 if (_settings_client.gui.link_terraform_toolbar) CloseWindowById(WC_SCEN_LAND_GEN, 0, false);
457 CloseWindowById(WC_SELECT_STATION, 0);
458 this->Window::Close();
459 }
460
461 /** List of widgets to be disabled if infrastructure limit prevents building. */
462 static inline const std::initializer_list<WidgetID> can_build_widgets = {

Callers 1

OnInvalidateDataMethod · 0.95

Calls 4

CloseWindowByIdFunction · 0.85
IsWidgetLoweredMethod · 0.80

Tested by

no test coverage detected