/** * Resets the palette and ignores the window * if there's only one target. */ void MultipleTargetsState::init() { _game->setPalette(_game->getResourcePack()->getPalette("BACKPALS.DAT")->getColors(Palette::blockOffset(7)), Palette::backPos, 16); if (_targets.size() == 1) { popupTarget(*_targets.begin()); } }
/** * Pick a target to display. * @param action Pointer to an action. */ void MultipleTargetsState::btnTargetClick(Action *action) { for (size_t i = 0; i < _btnTargets.size(); ++i) { if (action->getSender() == _btnTargets[i]) { popupTarget(_targets[i]); break; } } }
/** * Resets the palette and ignores the window * if there's only one target. */ void MultipleTargetsState::init() { if (_targets.size() == 1) { popupTarget(*_targets.begin()); } else { State::init(); } }
/** * Pick a target to display. * @param action Pointer to an action. */ void MultipleTargetsState::lstTargetsClick(Action *action) { Target* t = _targets[_lstTargets->getSelectedRow()]; popupTarget(t); }