SDL Utility
|
A static class that contains/handles data about mouse position and button states. More...
#include <Mouse.hpp>
Public Types | |
enum class | Button { Left = 1 , Right = 2 , Middle = 3 , XButton1 = 4 , XButton2 = 5 } |
Mouse buttons. More... | |
Static Public Member Functions | |
static Uint32 | GetButtonState () |
Returns the current mouse button state. More... | |
static bool | IsButtonDown (Button button) |
Checks if a specific button is pressed. More... | |
static Vector2i | GetPosition () |
Gets the absolute position of the mouse. More... | |
static Vector2i | GetPosition (const RenderWindow &relativeTo) |
Gets current relative position of the mouse. More... | |
static void | SetPosition (const Vector2i &position) |
Sets the absolute position of the mouse. More... | |
static void | SetPosition (const Vector2i &position, const RenderWindow &relativeTo) |
Sets current relative position of the mouse. More... | |
A static class that contains/handles data about mouse position and button states.
|
strong |
Mouse buttons.
Enumerator | |
---|---|
Left | |
Right | |
Middle | |
XButton1 | |
XButton2 |
|
static |
Returns the current mouse button state.
|
static |
Gets the absolute position of the mouse.
|
static |
Gets current relative position of the mouse.
[in] | relativeTo | The window the mouse position should be relative to |
|
static |
Checks if a specific button is pressed.
[in] | button | The button to check |
|
static |
Sets the absolute position of the mouse.
[in] | position | A 2D vector of the new position |
|
static |
Sets current relative position of the mouse.
[in] | position | A 2D vector of the new position |
[in] | relativeTo | The window the mouse position should be relative to |