The mouse event.
More...
Inherits Event.
|
unsigned int | _ID |
| object id, ScriptSupport need public _ID
|
|
int | _luaID |
| Lua reference id.
|
|
void * | _scriptObject |
| scriptObject, support for swift
|
|
bool | _rooted |
| When true, it means that the object was already rooted.
|
|
| Event (Type type) |
| Constructor.
|
|
MouseEventType Different types of MouseEvent.
NA
Constructor.
- Parameters
-
mouseEventCode | A given mouse event type. ctor |
void setScrollData |
( |
float |
scrollX, |
|
|
float |
scrollY |
|
) |
| |
|
inline |
Set mouse scroll data.
- Parameters
-
scrollX | The scroll data of x axis. |
scrollY | The scroll data of y axis. |
float getScrollX |
( |
| ) |
const |
|
inline |
Get mouse scroll data of x axis.
- Returns
- The scroll data of x axis.
float getScrollY |
( |
| ) |
const |
|
inline |
Get mouse scroll data of y axis.
- Returns
- The scroll data of y axis.
void setCursorPosition |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inline |
Set the cursor position.
- Parameters
-
x | The x coordinate of cursor position. |
y | The y coordinate of cursor position. setLocation |
void setMouseButton |
( |
MouseButton |
button | ) |
|
|
inline |
Set mouse button.
- Parameters
-
button | a given mouse button. setButton |
MouseButton getMouseButton |
( |
| ) |
const |
|
inline |
Get mouse button.
- Returns
- The mouse button. getButton
float getCursorX |
( |
| ) |
const |
|
inline |
Get the cursor position of x axis.
- Returns
- The x coordinate of cursor position. getLocationX
float getCursorY |
( |
| ) |
const |
|
inline |
Get the cursor position of y axis.
- Returns
- The y coordinate of cursor position. getLocationY
Vec2 getLocation |
( |
| ) |
const |
Returns the current touch location in OpenGL coordinates.
- Returns
- The current touch location in OpenGL coordinates.
Vec2 getPreviousLocation |
( |
| ) |
const |
Returns the previous touch location in OpenGL coordinates.
- Returns
- The previous touch location in OpenGL coordinates. NA
Vec2 getStartLocation |
( |
| ) |
const |
Returns the start touch location in OpenGL coordinates.
- Returns
- The start touch location in OpenGL coordinates. NA
Returns the delta of 2 current touches locations in screen coordinates.
- Returns
- The delta of 2 current touches locations in screen coordinates.
Vec2 getLocationInView |
( |
| ) |
const |
Returns the current touch location in screen coordinates.
- Returns
- The current touch location in screen coordinates.
Vec2 getPreviousLocationInView |
( |
| ) |
const |
Returns the previous touch location in screen coordinates.
- Returns
- The previous touch location in screen coordinates. NA
Vec2 getStartLocationInView |
( |
| ) |
const |
Returns the start touch location in screen coordinates.
- Returns
- The start touch location in screen coordinates. NA
The documentation for this class was generated from the following file: