MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / lstCraftsLeftClick

Method lstCraftsLeftClick

src/Geoscape/InterceptState.cpp:196–211  ·  view source on GitHub ↗

* Pick a target for the selected craft. * @param action Pointer to an action. */

Source from the content-addressed store, hash-verified

194 * @param action Pointer to an action.
195 */
196void 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.

Callers

nothing calls this directly

Calls 5

getSelectedRowMethod · 0.80
getLowFuelMethod · 0.80
pushStateMethod · 0.80
getStatusMethod · 0.45
popStateMethod · 0.45

Tested by

no test coverage detected