raylib-cpp
C++ object-oriented wrapper library for raylib.
Loading...
Searching...
No Matches
Functions
raylib::Mouse Namespace Reference

Input-related functions: mouse. More...

Functions

RLCPPAPI Vector2 GetDelta ()
 Get mouse delta between frames. More...
 
RLCPPAPI Vector2 GetPosition ()
 
RLCPPAPI Ray GetRay (::Vector2 mousePosition, const ::Camera &camera)
 Get a ray trace from mouse position. More...
 
RLCPPAPI Ray GetRay (const ::Camera &camera)
 Get a ray trace from mouse position. More...
 
RLCPPAPI Vector2 GetTouchPosition (int index)
 Get touch position XY for a touch point index (relative to screen size) More...
 
RLCPPAPI int GetTouchX ()
 Get touch position X for touch point 0 (relative to screen size) More...
 
RLCPPAPI int GetTouchY ()
 Get touch position Y for touch point 0 (relative to screen size) More...
 
RLCPPAPI float GetWheelMove ()
 Get mouse wheel movement for X or Y, whichever is larger. More...
 
RLCPPAPI Vector2 GetWheelMoveV ()
 Get mouse wheel movement for both X and Y. More...
 
RLCPPAPI int GetX ()
 
RLCPPAPI int GetY ()
 
RLCPPAPI bool IsButtonDown (int button)
 Detect if a mouse button is being pressed. More...
 
RLCPPAPI bool IsButtonPressed (int button)
 Detect if a mouse button has been pressed once. More...
 
RLCPPAPI bool IsButtonReleased (int button)
 Detect if a mouse button has been released once. More...
 
RLCPPAPI bool IsButtonUp (int button)
 
RLCPPAPI void SetCursor (int cursor=MOUSE_CURSOR_DEFAULT)
 Sets the current mouse cursor icon. More...
 
RLCPPAPI void SetOffset (::Vector2 offset)
 
RLCPPAPI void SetOffset (int offsetX=0, int offsetY=0)
 
RLCPPAPI void SetPosition (::Vector2 position)
 
RLCPPAPI void SetPosition (int x, int y)
 
RLCPPAPI void SetScale (::Vector2 scale)
 
RLCPPAPI void SetScale (float scaleX=1.0f, float scaleY=1.0f)
 
RLCPPAPI void SetX (int x)
 
RLCPPAPI void SetY (int y)
 

Detailed Description

Input-related functions: mouse.

Function Documentation

◆ GetDelta()

RLCPPAPI Vector2 raylib::Mouse::GetDelta ( )
inline

Get mouse delta between frames.

Definition at line 69 of file Mouse.hpp.

◆ GetPosition()

RLCPPAPI Vector2 raylib::Mouse::GetPosition ( )
inline

Definition at line 54 of file Mouse.hpp.

◆ GetRay() [1/2]

RLCPPAPI Ray raylib::Mouse::GetRay ( ::Vector2  mousePosition,
const ::Camera &  camera 
)
inline

Get a ray trace from mouse position.

Definition at line 138 of file Mouse.hpp.

◆ GetRay() [2/2]

RLCPPAPI Ray raylib::Mouse::GetRay ( const ::Camera &  camera)
inline

Get a ray trace from mouse position.

Definition at line 145 of file Mouse.hpp.

◆ GetTouchPosition()

RLCPPAPI Vector2 raylib::Mouse::GetTouchPosition ( int  index)
inline

Get touch position XY for a touch point index (relative to screen size)

Definition at line 131 of file Mouse.hpp.

◆ GetTouchX()

RLCPPAPI int raylib::Mouse::GetTouchX ( )
inline

Get touch position X for touch point 0 (relative to screen size)

Definition at line 117 of file Mouse.hpp.

◆ GetTouchY()

RLCPPAPI int raylib::Mouse::GetTouchY ( )
inline

Get touch position Y for touch point 0 (relative to screen size)

Definition at line 124 of file Mouse.hpp.

◆ GetWheelMove()

RLCPPAPI float raylib::Mouse::GetWheelMove ( )
inline

Get mouse wheel movement for X or Y, whichever is larger.

Definition at line 92 of file Mouse.hpp.

◆ GetWheelMoveV()

RLCPPAPI Vector2 raylib::Mouse::GetWheelMoveV ( )
inline

Get mouse wheel movement for both X and Y.

See also
::GetMouseWheelMoveV()

Definition at line 101 of file Mouse.hpp.

◆ GetX()

RLCPPAPI int raylib::Mouse::GetX ( )
inline

Definition at line 38 of file Mouse.hpp.

◆ GetY()

RLCPPAPI int raylib::Mouse::GetY ( )
inline

Definition at line 42 of file Mouse.hpp.

◆ IsButtonDown()

RLCPPAPI bool raylib::Mouse::IsButtonDown ( int  button)
inline

Detect if a mouse button is being pressed.

Definition at line 23 of file Mouse.hpp.

◆ IsButtonPressed()

RLCPPAPI bool raylib::Mouse::IsButtonPressed ( int  button)
inline

Detect if a mouse button has been pressed once.

Definition at line 16 of file Mouse.hpp.

◆ IsButtonReleased()

RLCPPAPI bool raylib::Mouse::IsButtonReleased ( int  button)
inline

Detect if a mouse button has been released once.

Definition at line 30 of file Mouse.hpp.

◆ IsButtonUp()

RLCPPAPI bool raylib::Mouse::IsButtonUp ( int  button)
inline

Definition at line 34 of file Mouse.hpp.

◆ SetCursor()

RLCPPAPI void raylib::Mouse::SetCursor ( int  cursor = MOUSE_CURSOR_DEFAULT)
inline

Sets the current mouse cursor icon.

See also
::MouseCursor

Definition at line 110 of file Mouse.hpp.

◆ SetOffset() [1/2]

RLCPPAPI void raylib::Mouse::SetOffset ( ::Vector2  offset)
inline

Definition at line 77 of file Mouse.hpp.

◆ SetOffset() [2/2]

RLCPPAPI void raylib::Mouse::SetOffset ( int  offsetX = 0,
int  offsetY = 0 
)
inline

Definition at line 73 of file Mouse.hpp.

◆ SetPosition() [1/2]

RLCPPAPI void raylib::Mouse::SetPosition ( ::Vector2  position)
inline

Definition at line 62 of file Mouse.hpp.

◆ SetPosition() [2/2]

RLCPPAPI void raylib::Mouse::SetPosition ( int  x,
int  y 
)
inline

Definition at line 58 of file Mouse.hpp.

◆ SetScale() [1/2]

RLCPPAPI void raylib::Mouse::SetScale ( ::Vector2  scale)
inline

Definition at line 85 of file Mouse.hpp.

◆ SetScale() [2/2]

RLCPPAPI void raylib::Mouse::SetScale ( float  scaleX = 1.0f,
float  scaleY = 1.0f 
)
inline

Definition at line 81 of file Mouse.hpp.

◆ SetX()

RLCPPAPI void raylib::Mouse::SetX ( int  x)
inline

Definition at line 46 of file Mouse.hpp.

◆ SetY()

RLCPPAPI void raylib::Mouse::SetY ( int  y)
inline

Definition at line 50 of file Mouse.hpp.