* Automatically updates the cursor position * when the mouse moves. * @param action Pointer to an action. */
| 51 | * @param action Pointer to an action. |
| 52 | */ |
| 53 | void Cursor::handle(Action *action) |
| 54 | { |
| 55 | if (action->getDetails()->type == SDL_MOUSEMOTION) |
| 56 | { |
| 57 | setX((int)floor((action->getDetails()->motion.x - action->getLeftBlackBand()) / action->getXScale())); |
| 58 | setY((int)floor((action->getDetails()->motion.y - action->getTopBlackBand()) / action->getYScale())); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Changes the cursor's base color. |
nothing calls this directly
no test coverage detected