This class implements mouse functionalities.
More...
|
static bool | allButtonsDown (const Button buttons, const bool synchron=true) |
| Returns whether all specified buttons of the mouse are currently pushed (down) or not. More...
|
|
static bool | oneButtonDown (const Button buttons, const bool synchron=true) |
| Returns whether at least one button of the specified buttons of the mouse is currently pushed (down) or not. More...
|
|
static bool | isButtonDown (const Button button, const bool synchron=true) |
| Returns whether exactly one (specified button) is currently pushed (down) or not. More...
|
|
static Button | currentMouseButtonState (const bool synchron=true) |
| Returns the current mouse button state for the left, middle and right mouse button. More...
|
|
static VectorI2 | screenPosition (const VectorI2 &invalidPosition=VectorI2(NumericT< int >::minValue(), NumericT< int >::minValue())) |
| Returns the current position of the mouse/cursor in screen coordinates. More...
|
|
This class implements mouse functionalities.
Not available on the following platforms: Android, IOS.
◆ Button
Definition of individual mouse buttons.
Enumerator |
---|
BUTTON_NONE | No key.
|
BUTTON_LEFT | The left mouse button.
|
BUTTON_MIDDLE | The middle mouse button.
|
BUTTON_RIGHT | The right mouse button.
|
BUTTON_LAST_UNIQUE_VALUE | Last key value.
|
◆ allButtonsDown()
static bool Ocean::Platform::Mouse::allButtonsDown |
( |
const Button |
buttons, |
|
|
const bool |
synchron = true |
|
) |
| |
|
static |
Returns whether all specified buttons of the mouse are currently pushed (down) or not.
- Parameters
-
buttons | The buttons for that the states are requested (may be a combination of several buttons) |
synchron | True, to request the state synchronously with the message queue; False, to request the state in the current moment |
- Returns
- True, if so; also True if no button is provided
◆ currentMouseButtonState()
static Button Ocean::Platform::Mouse::currentMouseButtonState |
( |
const bool |
synchron = true | ) |
|
|
static |
Returns the current mouse button state for the left, middle and right mouse button.
- Parameters
-
synchron | True, to request the state synchronously with the message queue; False, to request the state in the current moment |
- Returns
- Current mouse button state
◆ isButtonDown()
static bool Ocean::Platform::Mouse::isButtonDown |
( |
const Button |
button, |
|
|
const bool |
synchron = true |
|
) |
| |
|
static |
Returns whether exactly one (specified button) is currently pushed (down) or not.
- Parameters
-
button | One unique button for that the state is requested, must not be a combination of several buttons |
synchron | True, to request the state synchronously with the message queue; False, to request the state in the current moment |
- Returns
- True, if so
◆ isButtonDownApple()
static bool Ocean::Platform::Mouse::isButtonDownApple |
( |
const Button |
button, |
|
|
const bool |
synchron = true |
|
) |
| |
|
staticprotected |
Returns whether exactly one (specified button) is currently pushed (down) or not (specialization for Apple platforms).
- See also
- isButtonDown()
- Parameters
-
button | One unique button for that the state is requested, must not be a combination of several buttons |
synchron | True, to request the state synchronously with the message queue; False, to request the state in the current moment |
- Returns
- True, if so
◆ isButtonDownWindows()
static bool Ocean::Platform::Mouse::isButtonDownWindows |
( |
const Button |
button, |
|
|
const bool |
synchron = true |
|
) |
| |
|
staticprotected |
Returns whether exactly one (specified button) is currently pushed (down) or not (specialization for Windows).
- See also
- isButtonDown()
- Parameters
-
button | One unique button for that the state is requested, must not be a combination of several buttons |
synchron | True, to request the state synchronously with the message queue; False, to request the state in the current moment |
- Returns
- True, if so
◆ keyStateWindows()
static bool Ocean::Platform::Mouse::keyStateWindows |
( |
const int |
nVirtualKey, |
|
|
const bool |
synchron |
|
) |
| |
|
staticprotected |
Returns whether exactly one (specified key) is currently pushed (down) or not.
- Parameters
-
nVirtualKey | The virtual key code for that the state is requested |
synchron | True, to request the state synchronously with the message queue; False, to request the state in the current moment |
- Returns
- True, if so
◆ oneButtonDown()
static bool Ocean::Platform::Mouse::oneButtonDown |
( |
const Button |
buttons, |
|
|
const bool |
synchron = true |
|
) |
| |
|
static |
Returns whether at least one button of the specified buttons of the mouse is currently pushed (down) or not.
- Parameters
-
buttons | The buttons for that the states are requested (may be a combination of several buttons) |
synchron | True, to request the state synchronously with the message queue; False, to request the state in the current moment |
- Returns
- True, if so; also True if no button is provided
◆ screenPosition()
Returns the current position of the mouse/cursor in screen coordinates.
- Parameters
-
invalidPosition | The invalid mouse/cursor position if currently no mouse/cursor position exists or can be determined. |
- Returns
- Mouse screen coordinates
◆ screenPositionApple()
Returns the current position of the mouse/cursor in screen coordinates (specialization for Apple platforms).
- See also
- screenPosition()
- Parameters
-
invalidPosition | The invalid mouse/cursor position if currently no mouse/cursor position exists or can be determined. |
- Returns
- Mouse screen coordinates
◆ screenPositionWindows()
Returns the current position of the mouse/cursor in screen coordinates (specialization for Windows).
- See also
- screenPosition()
- Parameters
-
invalidPosition | The invalid mouse/cursor position if currently no mouse/cursor position exists or can be determined. |
- Returns
- Mouse screen coordinates
The documentation for this class was generated from the following file: