* Handles the mouse-wheels on the arrow-buttons. * @param action Pointer to an action. */
| 455 | * @param action Pointer to an action. |
| 456 | */ |
| 457 | void TransferItemsState::lstItemsMousePress(Action *action) |
| 458 | { |
| 459 | _sel = _lstItems->getSelectedRow(); |
| 460 | if (action->getDetails()->button.button == SDL_BUTTON_WHEELUP) |
| 461 | { |
| 462 | _timerInc->stop(); |
| 463 | _timerDec->stop(); |
| 464 | if (action->getAbsoluteXMouse() >= _lstItems->getArrowsLeftEdge() && |
| 465 | action->getAbsoluteXMouse() <= _lstItems->getArrowsRightEdge()) |
| 466 | { |
| 467 | increaseByValue(Options::changeValueByMouseWheel); |
| 468 | } |
| 469 | } |
| 470 | else if (action->getDetails()->button.button == SDL_BUTTON_WHEELDOWN) |
| 471 | { |
| 472 | _timerInc->stop(); |
| 473 | _timerDec->stop(); |
| 474 | if (action->getAbsoluteXMouse() >= _lstItems->getArrowsLeftEdge() && |
| 475 | action->getAbsoluteXMouse() <= _lstItems->getArrowsRightEdge()) |
| 476 | { |
| 477 | decreaseByValue(Options::changeValueByMouseWheel); |
| 478 | } |
| 479 | } |
| 480 | } |
| 481 | |
| 482 | /** |
| 483 | * Gets the transfer cost of the currently selected item. |
nothing calls this directly
no test coverage detected