MochiEngine
Loading...
Searching...
No Matches
Mochi::Input::IMouseProvider Class Referenceabstract

#include <IMouseProvider.h>

Inheritance diagram for Mochi::Input::IMouseProvider:
Mochi::Input::DummyMouseProvider Mochi::Input::SDLMouseProvider

Public Member Functions

virtual std::array< bool, MouseButton::MouseButtonsCount > GetState (float *x, float *y) const =0
 Gets the state of the mouse, consisting of the pointer position in the screen and each of its buttons, defined in InputCommons.h in the MouseButtons enum.

Detailed Description

Interface used to get per-frame data of the connected mouse.

Member Function Documentation

◆ GetState()

virtual std::array< bool, MouseButton::MouseButtonsCount > Mochi::Input::IMouseProvider::GetState ( float * x,
float * y ) const
pure virtual

Gets the state of the mouse, consisting of the pointer position in the screen and each of its buttons, defined in InputCommons.h in the MouseButtons enum.

Parameters
xReference to a value that will be updated in the method with the X position.
yReference to a value that will be updated in the method with the Y position.
Returns
An array of booleans for each mouse button, up to InputCommons.h in the MouseButtons enum.

Implemented in Mochi::Input::DummyMouseProvider, and Mochi::Input::SDLMouseProvider.


The documentation for this class was generated from the following file: