* Handle the click on the skip button. * If ctrl is pressed, skip to selected order, else skip to current order + 1 */
| 688 | * If ctrl is pressed, skip to selected order, else skip to current order + 1 |
| 689 | */ |
| 690 | void OrderClick_Skip() |
| 691 | { |
| 692 | /* Don't skip when there's nothing to skip */ |
| 693 | if (_ctrl_pressed && this->vehicle->cur_implicit_order_index == this->OrderGetSel()) return; |
| 694 | if (this->vehicle->GetNumOrders() <= 1) return; |
| 695 | |
| 696 | Command<CMD_SKIP_TO_ORDER>::Post(_ctrl_pressed ? STR_ERROR_CAN_T_SKIP_TO_ORDER : STR_ERROR_CAN_T_SKIP_ORDER, |
| 697 | this->vehicle->tile, this->vehicle->index, _ctrl_pressed ? this->OrderGetSel() : ((this->vehicle->cur_implicit_order_index + 1) % this->vehicle->GetNumOrders())); |
| 698 | } |
| 699 | |
| 700 | /** |
| 701 | * Handle the click on the delete button. |
no test coverage detected