MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / handle

Method handle

src/Interface/Cursor.cpp:53–60  ·  view source on GitHub ↗

* Automatically updates the cursor position * when the mouse moves. * @param action Pointer to an action. */

Source from the content-addressed store, hash-verified

51 * @param action Pointer to an action.
52 */
53void 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.

Callers

nothing calls this directly

Calls 5

getDetailsMethod · 0.80
getLeftBlackBandMethod · 0.80
getTopBlackBandMethod · 0.80
getXScaleMethod · 0.45
getYScaleMethod · 0.45

Tested by

no test coverage detected