/** * Removes scientists from the current project; * one scientist on left-click, all scientists on right-click. * @param action Pointer to an Action. */ void ResearchInfoState::lessClick(Action *action) { if (action->getDetails()->button.button == SDL_BUTTON_RIGHT) lessByValue(std::numeric_limits<int>::max()); if (action->getDetails()->button.button == SDL_BUTTON_LEFT) lessByValue(1); }
/** * Removes scientists from the current project; * one scientist on left-click, all scientists on right-click. * @param action Pointer to an Action. */ void ResearchInfoState::lessClick(Action *action) { if (action->getDetails()->button.button == SDL_BUTTON_RIGHT) lessByValue(INT_MAX); if (action->getDetails()->button.button == SDL_BUTTON_LEFT) lessByValue(1); }
/** * Removes one scientist from the project if possible. */ void ResearchInfoState::less() { _timerLess->setInterval(50); lessByValue(1); }
/** * Increases or decreases the scientists according the mouse-wheel used. * @param action Pointer to an Action. */ void ResearchInfoState::handleWheel(Action *action) { if (action->getDetails()->button.button == SDL_BUTTON_WHEELUP) moreByValue(Options::changeValueByMouseWheel); else if (action->getDetails()->button.button == SDL_BUTTON_WHEELDOWN) lessByValue(Options::changeValueByMouseWheel); }