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

Input-related functions: mouse. More...

Functions

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

Detailed Description

Input-related functions: mouse.

Function Documentation

◆ GetDelta()

static Vector2 raylib::Mouse::GetDelta ( )
inlinestatic

Get mouse delta between frames.

Definition at line 71 of file Mouse.hpp.

◆ GetPosition()

static Vector2 raylib::Mouse::GetPosition ( )
inlinestatic

Definition at line 56 of file Mouse.hpp.

◆ GetRay() [1/2]

static Ray raylib::Mouse::GetRay ( ::Vector2  mousePosition,
const ::Camera &  camera 
)
inlinestatic

Get a ray trace from mouse position.

Definition at line 140 of file Mouse.hpp.

◆ GetRay() [2/2]

static Ray raylib::Mouse::GetRay ( const ::Camera &  camera)
inlinestatic

Get a ray trace from mouse position.

Definition at line 147 of file Mouse.hpp.

◆ GetTouchPosition()

static Vector2 raylib::Mouse::GetTouchPosition ( int  index)
inlinestatic

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

Definition at line 133 of file Mouse.hpp.

◆ GetTouchX()

static int raylib::Mouse::GetTouchX ( )
inlinestatic

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

Definition at line 119 of file Mouse.hpp.

◆ GetTouchY()

static int raylib::Mouse::GetTouchY ( )
inlinestatic

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

Definition at line 126 of file Mouse.hpp.

◆ GetWheelMove()

static float raylib::Mouse::GetWheelMove ( )
inlinestatic

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

Definition at line 94 of file Mouse.hpp.

◆ GetWheelMoveV()

static Vector2 raylib::Mouse::GetWheelMoveV ( )
inlinestatic

Get mouse wheel movement for both X and Y.

See also
::GetMouseWheelMoveV()

Definition at line 103 of file Mouse.hpp.

◆ GetX()

static int raylib::Mouse::GetX ( )
inlinestatic

Definition at line 40 of file Mouse.hpp.

◆ GetY()

static int raylib::Mouse::GetY ( )
inlinestatic

Definition at line 44 of file Mouse.hpp.

◆ IsButtonDown()

static bool raylib::Mouse::IsButtonDown ( int  button)
inlinestatic

Detect if a mouse button is being pressed.

Definition at line 25 of file Mouse.hpp.

◆ IsButtonPressed()

static bool raylib::Mouse::IsButtonPressed ( int  button)
inlinestatic

Detect if a mouse button has been pressed once.

Definition at line 18 of file Mouse.hpp.

◆ IsButtonReleased()

static bool raylib::Mouse::IsButtonReleased ( int  button)
inlinestatic

Detect if a mouse button has been released once.

Definition at line 32 of file Mouse.hpp.

◆ IsButtonUp()

static bool raylib::Mouse::IsButtonUp ( int  button)
inlinestatic

Definition at line 36 of file Mouse.hpp.

◆ SetCursor()

static void raylib::Mouse::SetCursor ( int  cursor = MOUSE_CURSOR_DEFAULT)
inlinestatic

Sets the current mouse cursor icon.

See also
::MouseCursor

Definition at line 112 of file Mouse.hpp.

◆ SetOffset() [1/2]

static void raylib::Mouse::SetOffset ( ::Vector2  offset)
inlinestatic

Definition at line 79 of file Mouse.hpp.

◆ SetOffset() [2/2]

static void raylib::Mouse::SetOffset ( int  offsetX = 0,
int  offsetY = 0 
)
inlinestatic

Definition at line 75 of file Mouse.hpp.

◆ SetPosition() [1/2]

static void raylib::Mouse::SetPosition ( ::Vector2  position)
inlinestatic

Definition at line 64 of file Mouse.hpp.

◆ SetPosition() [2/2]

static void raylib::Mouse::SetPosition ( int  x,
int  y 
)
inlinestatic

Definition at line 60 of file Mouse.hpp.

◆ SetScale() [1/2]

static void raylib::Mouse::SetScale ( ::Vector2  scale)
inlinestatic

Definition at line 87 of file Mouse.hpp.

◆ SetScale() [2/2]

static void raylib::Mouse::SetScale ( float  scaleX = 1.0f,
float  scaleY = 1.0f 
)
inlinestatic

Definition at line 83 of file Mouse.hpp.

◆ SetX()

static void raylib::Mouse::SetX ( int  x)
inlinestatic

Definition at line 48 of file Mouse.hpp.

◆ SetY()

static void raylib::Mouse::SetY ( int  y)
inlinestatic

Definition at line 52 of file Mouse.hpp.