MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / getMouseState

Method getMouseState

src/engine/Input.cpp:324–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324void Input::getMouseState(Input::MouseState& ms)
325{
326 ms.m_mx = (int)((mousePosition.x + 1) * windowHalfWidth);
327 ms.m_my = (int)((mousePosition.y + 1) * windowHalfHeight);
328 ms.m_mz = (int)axisPosition[static_cast<std::size_t>(MouseAxis::ScrollY)];
329 ms.m_buttons[0] = (uint8_t)mouseButtonState[0];
330 ms.m_buttons[1] = (uint8_t)mouseButtonState[1];
331 ms.m_buttons[2] = (uint8_t)mouseButtonState[2];
332}
333
334void Input::clearTriggered()
335{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected