CryEngine.Mouse

Central point for mouse access. Listens to CryEngine sided mouse callbacks and generates events from them. More...

Classes

interface IMouseOverride
Interface for overriding mouse input. More...

Public Member Functions

delegate void MouseEventHandler (int x, int y)
Used by all Mouse events. More...

Static Public Member Functions

static void ShowCursor ()
Show the mouse-cursor More...
static void HideCursor ()
Hide the mouse-cursor More...
static void SetOverride (IMouseOverride mouseOverride)
Overrides the mouse input. More...
static void HitScenes (int x, int y)
Fires a raycast to check if UI is hit at the specified coordinates. More...

Properties

static Point CursorPosition [get]
Current Mouse Cursor Position, refreshed before update loop. More...
static bool LeftDown [get]
Indicates whether left mouse button is Down during one update phase. More...
static bool LeftUp [get]
Indicates whether left mouse button is Released during one update phase. More...
static bool RightDown [get]
Indicates whether right mouse button is Down during one update phase. More...
static bool RightUp [get]
Indicates whether right mouse button is Released during one update phase. More...
static uint HitEntityId [get, set]
ID of the Entity currently under the cursor position. More...
static Vector2 HitEntityUV [get, set]
UV-coordinates where the mouse-cursor is hitting an Entity. More...
static Entity HitEntity [get]
The Entity currently under the cursor position More...

Events

static MouseEventHandler OnLeftButtonDown
Invoked when the left mouse button is pressed down. More...
static MouseEventHandler OnLeftButtonUp
Invoked when the left mouse button is released after being pressed down. More...
static MouseEventHandler OnRightButtonDown
Invoked when the right mouse button is pressed down. More...
static MouseEventHandler OnRightButtonUp
Invoked when the right mouse button is released after being pressed down. More...
static MouseEventHandler OnMove
Invoked when the mouse has moved. More...
static MouseEventHandler OnWindowLeave
Invoked when the mouse moves outside of a window. More...
static MouseEventHandler OnWindowEnter
Invoked when the mouse enters a window. More...

Detailed Description

Central point for mouse access. Listens to CryEngine sided mouse callbacks and generates events from them.

Member Function Documentation

◆ HideCursor()

static void CryEngine.Mouse.HideCursor ( )
inline
static

Hide the mouse-cursor

◆ HitScenes()

static void CryEngine.Mouse.HitScenes ( int x,
int y
)
inline
static

Fires a raycast to check if UI is hit at the specified coordinates.

Parameters
x
y

◆ MouseEventHandler()

delegate void CryEngine.Mouse.MouseEventHandler ( int x,
int y
)

Used by all Mouse events.

◆ SetOverride()

static void CryEngine.Mouse.SetOverride ( IMouseOverride mouseOverride)
inline
static

Overrides the mouse input.

Parameters
mouseOverride

◆ ShowCursor()

static void CryEngine.Mouse.ShowCursor ( )
inline
static

Show the mouse-cursor

Property Documentation

◆ CursorPosition

Point CryEngine.Mouse.CursorPosition
static
get

Current Mouse Cursor Position, refreshed before update loop.

◆ HitEntity

Entity CryEngine.Mouse.HitEntity
static
get

The Entity currently under the cursor position

◆ HitEntityId

uint CryEngine.Mouse.HitEntityId
static
get
set

ID of the Entity currently under the cursor position.

◆ HitEntityUV

Vector2 CryEngine.Mouse.HitEntityUV
static
get
set

UV-coordinates where the mouse-cursor is hitting an Entity.

◆ LeftDown

bool CryEngine.Mouse.LeftDown
static
get

Indicates whether left mouse button is Down during one update phase.

◆ LeftUp

bool CryEngine.Mouse.LeftUp
static
get

Indicates whether left mouse button is Released during one update phase.

◆ RightDown

bool CryEngine.Mouse.RightDown
static
get

Indicates whether right mouse button is Down during one update phase.

◆ RightUp

bool CryEngine.Mouse.RightUp
static
get

Indicates whether right mouse button is Released during one update phase.

Event Documentation

◆ OnLeftButtonDown

MouseEventHandler CryEngine.Mouse.OnLeftButtonDown
static

Invoked when the left mouse button is pressed down.

◆ OnLeftButtonUp

MouseEventHandler CryEngine.Mouse.OnLeftButtonUp
static

Invoked when the left mouse button is released after being pressed down.

◆ OnMove

MouseEventHandler CryEngine.Mouse.OnMove
static

Invoked when the mouse has moved.

◆ OnRightButtonDown

MouseEventHandler CryEngine.Mouse.OnRightButtonDown
static

Invoked when the right mouse button is pressed down.

◆ OnRightButtonUp

MouseEventHandler CryEngine.Mouse.OnRightButtonUp
static

Invoked when the right mouse button is released after being pressed down.

◆ OnWindowEnter

MouseEventHandler CryEngine.Mouse.OnWindowEnter
static

Invoked when the mouse enters a window.

◆ OnWindowLeave

MouseEventHandler CryEngine.Mouse.OnWindowLeave
static

Invoked when the mouse moves outside of a window.