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

Method btnPrevClick

src/Battlescape/InventoryState.cpp:411–426  ·  view source on GitHub ↗

* Selects the previous soldier. * @param action Pointer to an action. */

Source from the content-addressed store, hash-verified

409 * @param action Pointer to an action.
410 */
411void InventoryState::btnPrevClick(Action *)
412{
413 if (_inv->getSelectedItem() != 0)
414 {
415 return;
416 }
417 if (_parent)
418 {
419 _parent->selectPreviousPlayerUnit(false, false, true);
420 }
421 else
422 {
423 _battleGame->selectPreviousPlayerUnit(false, false, true);
424 }
425 init();
426}
427
428/**
429 * Selects the next soldier.

Callers

nothing calls this directly

Calls 3

initFunction · 0.85
getSelectedItemMethod · 0.80

Tested by

no test coverage detected