| 508 | } |
| 509 | |
| 510 | void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override |
| 511 | { |
| 512 | _remove_button_clicked = false; |
| 513 | _one_way_button_clicked = false; |
| 514 | switch (widget) { |
| 515 | case WID_ROT_ROAD_X: |
| 516 | HandlePlacePushButton(this, WID_ROT_ROAD_X, GetRoadTypeInfo(this->roadtype)->cursor.road_nwse, HT_RECT); |
| 517 | this->last_started_action = widget; |
| 518 | break; |
| 519 | |
| 520 | case WID_ROT_ROAD_Y: |
| 521 | HandlePlacePushButton(this, WID_ROT_ROAD_Y, GetRoadTypeInfo(this->roadtype)->cursor.road_swne, HT_RECT); |
| 522 | this->last_started_action = widget; |
| 523 | break; |
| 524 | |
| 525 | case WID_ROT_AUTOROAD: |
| 526 | HandlePlacePushButton(this, WID_ROT_AUTOROAD, GetRoadTypeInfo(this->roadtype)->cursor.autoroad, HT_RECT); |
| 527 | this->last_started_action = widget; |
| 528 | break; |
| 529 | |
| 530 | case WID_ROT_DEMOLISH: |
| 531 | HandlePlacePushButton(this, WID_ROT_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL); |
| 532 | this->last_started_action = widget; |
| 533 | break; |
| 534 | |
| 535 | case WID_ROT_DEPOT: |
| 536 | if (HandlePlacePushButton(this, WID_ROT_DEPOT, GetRoadTypeInfo(this->roadtype)->cursor.depot, HT_RECT)) { |
| 537 | ShowRoadDepotPicker(this); |
| 538 | this->last_started_action = widget; |
| 539 | } |
| 540 | break; |
| 541 | |
| 542 | case WID_ROT_BUILD_WAYPOINT: |
| 543 | this->last_started_action = widget; |
| 544 | if (HandlePlacePushButton(this, WID_ROT_BUILD_WAYPOINT, SPR_CURSOR_WAYPOINT, HT_RECT)) { |
| 545 | ShowBuildRoadWaypointPicker(this); |
| 546 | } |
| 547 | break; |
| 548 | |
| 549 | case WID_ROT_BUS_STATION: |
| 550 | if (HandlePlacePushButton(this, WID_ROT_BUS_STATION, SPR_CURSOR_BUS_STATION, HT_RECT)) { |
| 551 | ShowRVStationPicker(this, RoadStopType::Bus); |
| 552 | this->last_started_action = widget; |
| 553 | } |
| 554 | break; |
| 555 | |
| 556 | case WID_ROT_TRUCK_STATION: |
| 557 | if (HandlePlacePushButton(this, WID_ROT_TRUCK_STATION, SPR_CURSOR_TRUCK_STATION, HT_RECT)) { |
| 558 | ShowRVStationPicker(this, RoadStopType::Truck); |
| 559 | this->last_started_action = widget; |
| 560 | } |
| 561 | break; |
| 562 | |
| 563 | case WID_ROT_ONE_WAY: |
| 564 | if (this->IsWidgetDisabled(WID_ROT_ONE_WAY)) return; |
| 565 | this->SetDirty(); |
| 566 | this->ToggleWidgetLoweredState(WID_ROT_ONE_WAY); |
| 567 | SetSelectionRed(false); |
nothing calls this directly
no test coverage detected