#include <Mouse.hpp>
|
enum | Button {
Unknown,
Left,
Right,
Middle,
X1,
X2,
X3,
X4,
X5
} |
|
enum | Mode { Mode::Visible,
Mode::Hidden,
Mode::Frozen
} |
|
Definition at line 36 of file Mouse.hpp.
Mouse buttons
Enumerator |
---|
Unknown |
|
Left |
|
Right |
|
Middle |
|
X1 |
|
X2 |
|
X3 |
|
X4 |
|
X5 |
|
Definition at line 42 of file Mouse.hpp.
Mouse modes
Enumerator |
---|
Visible |
Visible makes cursor visible and behave normally.
|
Hidden |
Hidden makes cursor invisible when its not over the client area of the window, but does not restrict it from leaving.
|
Frozen |
Frozen hides and grabs the cursor, providing virtual and unlimited cursor movement.
|
Definition at line 57 of file Mouse.hpp.
static const std::pair<glm::ivec2, glm::ivec2>& jop::Mouse::getClipping |
( |
| ) |
|
|
static |
Get clipping coordinates of the mouse cursor.
- Returns
- The clipping coordinates (first = minimum, second = maximum)
static glm::vec2 jop::Mouse::getPosition |
( |
| ) |
|
|
static |
Get the mouse cursor position.
- Returns
- The mouse position
static bool jop::Mouse::isButtonDown |
( |
const Button |
button | ) |
|
|
static |
Check if a mouse button is down.
- Parameters
-
- Returns
- True if button is down
static bool jop::Mouse::isClipping |
( |
| ) |
|
|
static |
Check if the mouse cursor has been clipped.
- Returns
- True if the mouse cursor is clipped
static void jop::Mouse::releaseClipping |
( |
| ) |
|
|
static |
Release the mouse cursor if it was previously clipped.
static void jop::Mouse::setClipping |
( |
| ) |
|
|
static |
Restricts the mouse cursor inside the main window.
static void jop::Mouse::setClipping |
( |
const glm::ivec2 & |
min, |
|
|
const glm::ivec2 & |
max |
|
) |
| |
|
static |
Restricts mouse into a rectangular area inside the main window.
The coordinates are relative to the main window.
- Parameters
-
min | The minimum coordinates of the restriction rectangle (left, top) |
max | The maximum coordinates of the restriction rectangle (right, bottom) |
static void jop::Mouse::setMouseMode |
( |
const Mode |
mode | ) |
|
|
static |
Set the mouse mode.
- Parameters
-
The documentation for this class was generated from the following file: