/** * Allocates scientists to the current project; * one scientist on left-click, all scientists on right-click. * @param action Pointer to an Action. */ void ResearchInfoState::moreClick(Action *action) { if (action->getDetails()->button.button == SDL_BUTTON_RIGHT) moreByValue(std::numeric_limits<int>::max()); if (action->getDetails()->button.button == SDL_BUTTON_LEFT) moreByValue(1); }
/** * Allocates scientists to the current project; * one scientist on left-click, all scientists on right-click. * @param action Pointer to an Action. */ void ResearchInfoState::moreClick(Action *action) { if (action->getDetails()->button.button == SDL_BUTTON_RIGHT) moreByValue(INT_MAX); if (action->getDetails()->button.button == SDL_BUTTON_LEFT) moreByValue(1); }
/** * Adds one scientist to the project if possible. */ void ResearchInfoState::more() { _timerMore->setInterval(50); moreByValue(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); }