* Handles the mouse-wheels on the arrow-buttons. * @param action Pointer to an action. */
| 336 | * @param action Pointer to an action. |
| 337 | */ |
| 338 | void ManageAlienContainmentState::lstItemsMousePress(Action *action) |
| 339 | { |
| 340 | _sel = _lstAliens->getSelectedRow(); |
| 341 | if (action->getDetails()->button.button == SDL_BUTTON_WHEELUP) |
| 342 | { |
| 343 | _timerInc->stop(); |
| 344 | _timerDec->stop(); |
| 345 | if (action->getAbsoluteXMouse() >= _lstAliens->getArrowsLeftEdge() && |
| 346 | action->getAbsoluteXMouse() <= _lstAliens->getArrowsRightEdge()) |
| 347 | { |
| 348 | increaseByValue(Options::changeValueByMouseWheel); |
| 349 | } |
| 350 | } |
| 351 | else if (action->getDetails()->button.button == SDL_BUTTON_WHEELDOWN) |
| 352 | { |
| 353 | _timerInc->stop(); |
| 354 | _timerDec->stop(); |
| 355 | if (action->getAbsoluteXMouse() >= _lstAliens->getArrowsLeftEdge() && |
| 356 | action->getAbsoluteXMouse() <= _lstAliens->getArrowsRightEdge()) |
| 357 | { |
| 358 | decreaseByValue(Options::changeValueByMouseWheel); |
| 359 | } |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | /** |
| 364 | * Gets the quantity of the currently selected alien on the base. |
nothing calls this directly
no test coverage detected