P-E-R-R-Y
Utilitaires, contrats et vendors du moteur, en une seule doc
Loading...
Searching...
No Matches
RayMouse Class Reference

raylib mouse. More...

#include <RayMouse.hpp>

Inheritance diagram for RayMouse:
Collaboration diagram for RayMouse:

Public Member Functions

 RayMouse ()=default
 ~RayMouse () override=default
bool isButtonPressed (Buttons key) const override
 notice if a button is pressed
bool isButtonDown (Buttons key) const override
 notice if a button is down
bool isButtonReleased (Buttons key) const override
 notice if a button is released
bool isButtonUp (Buttons key) const override
 notice if a button is up
Vector2f getPosition () const override
 get the position of the mouse
void setPosition (Vector2f position) override
 set the position of the mouse
float GetMouseWheelMove () const override
 get the mouse wheel move
Public Member Functions inherited from graphic::IMouse
virtual ~IMouse ()=default
 Destroy the IMouse interface.

Additional Inherited Members

Public Types inherited from graphic::IMouse
enum  Buttons {
  BUTTON_LEFT , BUTTON_RIGHT , BUTTON_MIDDLE , EXTRA_BUTTON_1 ,
  EXTRA_BUTTON_2
}

Detailed Description

raylib mouse.

The one place in the wrapper resting on a numeric coincidence : IMouse::Buttons and raylib's MouseButton share the same values, so the value is passed straight through with no mapping table. Reordering either enum breaks it silently.

Constructor & Destructor Documentation

◆ RayMouse()

RayMouse::RayMouse ( )
default

◆ ~RayMouse()

RayMouse::~RayMouse ( )
overridedefault

Member Function Documentation

◆ GetMouseWheelMove()

float RayMouse::GetMouseWheelMove ( ) const
inlineoverridevirtual

get the mouse wheel move

Returns
float

Implements graphic::IMouse.

◆ getPosition()

Vector2f RayMouse::getPosition ( ) const
inlineoverridevirtual

get the position of the mouse

Returns
Vector2f

Implements graphic::IMouse.

◆ isButtonDown()

bool RayMouse::isButtonDown ( Buttons key) const
inlineoverridevirtual

notice if a button is down

Parameters
key
Returns
true
false

Implements graphic::IMouse.

◆ isButtonPressed()

bool RayMouse::isButtonPressed ( Buttons key) const
inlineoverridevirtual

notice if a button is pressed

Parameters
key
Returns
true
false

Implements graphic::IMouse.

◆ isButtonReleased()

bool RayMouse::isButtonReleased ( Buttons key) const
inlineoverridevirtual

notice if a button is released

Parameters
key
Returns
true
false

Implements graphic::IMouse.

◆ isButtonUp()

bool RayMouse::isButtonUp ( Buttons key) const
inlineoverridevirtual

notice if a button is up

Parameters
key
Returns
true
false

Implements graphic::IMouse.

◆ setPosition()

void RayMouse::setPosition ( Vector2f position)
inlineoverridevirtual

set the position of the mouse

Parameters
position

Implements graphic::IMouse.


The documentation for this class was generated from the following file: