ChaiLove API
0.28.0
|
Provides an interface to the user's mouse. More...
Public Member Functions | |
int | getX () |
Returns the current x-position of the mouse. More... | |
int | getY () |
Returns the current y-position of the mouse. More... | |
Types::Graphics::Point | getPosition () |
Returns the current position of the mouse. More... | |
bool | isDown (int button) |
Checks whether a certain button is down. More... | |
bool | isDown (const std::string &button) |
Checks whether a certain button is down. More... | |
Provides an interface to the user's mouse.
Types::Graphics::Point love::mouse::getPosition | ( | ) |
Returns the current position of the mouse.
int love::mouse::getX | ( | ) |
Returns the current x-position of the mouse.
int love::mouse::getY | ( | ) |
Returns the current y-position of the mouse.
bool love::mouse::isDown | ( | int | button | ) |
Checks whether a certain button is down.
button | The index of a button to check. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependant. |
bool love::mouse::isDown | ( | const std::string & | button | ) |
Checks whether a certain button is down.
button | The mouse button to check. "left", "middle", "right", etc. |