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

Method OnClick

src/dock_gui.cpp:571–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569 }
570
571 void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
572 {
573 switch (widget) {
574 case WID_BDD_X:
575 case WID_BDD_Y:
576 this->RaiseWidget(WID_BDD_X + _ship_depot_direction);
577 _ship_depot_direction = (widget == WID_BDD_X ? AXIS_X : AXIS_Y);
578 this->LowerWidget(WID_BDD_X + _ship_depot_direction);
579 SndClickBeep();
580 UpdateDocksDirection();
581 this->SetDirty();
582 break;
583 }
584 }
585};
586
587static constexpr std::initializer_list<NWidgetPart> _nested_build_docks_depot_widgets = {

Callers

nothing calls this directly

Calls 4

SndClickBeepFunction · 0.85
RaiseWidgetMethod · 0.80
LowerWidgetMethod · 0.80
SetDirtyMethod · 0.45

Tested by

no test coverage detected