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

Method getRelativeXMouse

src/Engine/Action.cpp:156–161  ·  view source on GitHub ↗

* Returns the relative X position of the * mouse cursor relative to the surface that * triggered the action, corrected for screen scaling. * @return Mouse's relative X position. */

Source from the content-addressed store, hash-verified

154 * @return Mouse's relative X position.
155 */
156double Action::getRelativeXMouse() const
157{
158 if (_mouseX == -1)
159 return -1;
160 return _mouseX - _surfaceX * _scaleX;
161}
162
163/**
164 * Returns the relative X position of the

Callers 5

mouseClickMethod · 0.80
mouseClickMethod · 0.80
mouseOverMethod · 0.80
mouseOverMethod · 0.80
mousePressMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected