* Returns to the previous screen. * @param action Pointer to an action. */
| 145 | * @param action Pointer to an action. |
| 146 | */ |
| 147 | void ConfirmDestinationState::btnCancelClick(Action *) |
| 148 | { |
| 149 | Waypoint *w = dynamic_cast<Waypoint*>(_target); |
| 150 | if (w != 0 && w->getId() == 0) |
| 151 | { |
| 152 | delete w; |
| 153 | } |
| 154 | _game->popState(); |
| 155 | } |
| 156 | |
| 157 | } |