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

Method btnCancelClick

src/Geoscape/GeoscapeCraftState.cpp:317–328  ·  view source on GitHub ↗

* Closes the window. * @param action Pointer to an action. */

Source from the content-addressed store, hash-verified

315 * @param action Pointer to an action.
316 */
317void GeoscapeCraftState::btnCancelClick(Action *)
318{
319 // Go to the last known UFO position
320 if (_waypoint != 0)
321 {
322 _waypoint->setId(_game->getSavedGame()->getId("STR_WAYPOINT"));
323 _game->getSavedGame()->getWaypoints()->push_back(_waypoint);
324 _craft->setDestination(_waypoint);
325 }
326 // Cancel
327 _game->popState();
328}
329
330}

Callers

nothing calls this directly

Calls 6

getSavedGameMethod · 0.80
setIdMethod · 0.45
getIdMethod · 0.45
getWaypointsMethod · 0.45
setDestinationMethod · 0.45
popStateMethod · 0.45

Tested by

no test coverage detected