⚠️ This documentation corresponds to the latest development branch of axmol. It might diverge from the official releases.
|
Axmol Engine 3.0.0-dff292a
|
The mouse event. More...
#include <EventMouse.h>
Inherits Event.
Public Types | |
| enum class | MouseEventType |
| MouseEventType Different types of MouseEvent. | |
| Public Types inherited from Event | |
| enum class | Type |
| Type Event type. | |
Public Member Functions | |
| EventMouse () | |
| Constructor. | |
| MouseEventType | getMouseEventType () const |
| Get mouse event type. | |
| void | setScrollData (float scrollX, float scrollY) |
| Set mouse scroll data. | |
| float | getScrollX () const |
| Get mouse scroll data of x axis. | |
| float | getScrollY () const |
| Get mouse scroll data of y axis. | |
| void | setMouseInfo (float x, float y, MouseButton button, MouseEventType type) |
| Set the cursor position. | |
| void | setMouseButton (MouseButton button) |
| Set mouse button. | |
| MouseButton | getMouseButton () const |
| Get mouse button. | |
| AX_DEPRECATED (2.2) float getCursorX() const | |
| Get the cursor position of x axis. | |
| AX_DEPRECATED (2.2) float getCursorY() const | |
| Get the cursor position of y axis. | |
| Vec2 | getLocation () const |
| Returns the current touch location in OpenGL coordinates. | |
| Vec2 | getPreviousLocation () const |
| Returns the previous touch location in OpenGL coordinates. | |
| Vec2 | getStartLocation () const |
| Returns the start touch location in OpenGL coordinates. | |
| Vec2 | getDelta () const |
| Returns the delta of 2 current touches locations in screen coordinates. | |
| Vec2 | getLocationInView () const |
| Returns the current touch location in screen coordinates. | |
| Vec2 | getPreviousLocationInView () const |
| Returns the previous touch location in screen coordinates. | |
| Vec2 | getStartLocationInView () const |
| Returns the start touch location in screen coordinates. | |
| Public Member Functions inherited from Event | |
| Event (Type type) | |
| Constructor. | |
| virtual | ~Event () |
| Destructor. | |
| Type | getType () const |
| Gets the event type. | |
| void | stopPropagation () |
| Stops propagation for current event. | |
| bool | isStopped () const |
| Checks whether the event has been stopped. | |
| Node * | getCurrentTarget () |
| Gets current target of the event. | |
| Public Member Functions inherited from Object | |
| void | retain () |
| Retains the ownership. | |
| void | release () |
| Releases the ownership immediately. | |
| Object * | autorelease () |
| Releases the ownership sometime soon automatically. | |
| unsigned int | getReferenceCount () const |
| Returns the Object's current reference count. | |
| virtual | ~Object () |
| Destructor. | |
Additional Inherited Members | |
| Public Attributes inherited from Object | |
| unsigned int | _ID |
| object id, ScriptSupport need public _ID | |
| int | _luaID |
| Lua reference id. | |
The mouse event.
| EventMouse | ( | ) |
Constructor.
| mouseEventCode | A given mouse event type. |
|
inline |
Get mouse event type.
|
inline |
Set mouse scroll data.
| scrollX | The scroll data of x axis. |
| scrollY | The scroll data of y axis. |
|
inline |
Get mouse scroll data of x axis.
|
inline |
Get mouse scroll data of y axis.
|
inline |
Set the cursor position.
| x | The x coordinate of cursor position. |
| y | The y coordinate of cursor position. |
|
inline |
Set mouse button.
| button | a given mouse button. |
|
inline |
Get mouse button.
|
inline |
Get the cursor position of x axis.
|
inline |
Get the cursor position of y axis.
| Vec2 getLocation | ( | ) | const |
Returns the current touch location in OpenGL coordinates.
| Vec2 getPreviousLocation | ( | ) | const |
Returns the previous touch location in OpenGL coordinates.
| Vec2 getStartLocation | ( | ) | const |
Returns the start touch location in OpenGL coordinates.
| Vec2 getDelta | ( | ) | const |
Returns the delta of 2 current touches locations in screen coordinates.
| Vec2 getLocationInView | ( | ) | const |
Returns the current touch location in screen coordinates.
| Vec2 getPreviousLocationInView | ( | ) | const |
Returns the previous touch location in screen coordinates.
| Vec2 getStartLocationInView | ( | ) | const |
Returns the start touch location in screen coordinates.