* Pick a target for the selected craft. * @param action Pointer to an action. */
| 194 | * @param action Pointer to an action. |
| 195 | */ |
| 196 | void InterceptState::lstCraftsLeftClick(Action *) |
| 197 | { |
| 198 | Craft* c = _crafts[_lstCrafts->getSelectedRow()]; |
| 199 | if (c->getStatus() == "STR_READY" || ((c->getStatus() == "STR_OUT" || Options::craftLaunchAlways) && !c->getLowFuel())) |
| 200 | { |
| 201 | _game->popState(); |
| 202 | if (_target == 0) |
| 203 | { |
| 204 | _game->pushState(new SelectDestinationState(_game, c, _globe)); |
| 205 | } |
| 206 | else |
| 207 | { |
| 208 | _game->pushState(new ConfirmDestinationState(_game, c, _target)); |
| 209 | } |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | /** |
| 214 | * Centers on the selected craft. |
nothing calls this directly
no test coverage detected