JugiMap Framework
Mouse Class Reference

The Mouse class provide information about mouse input. More...

#include <jmInput.h>

Public Member Functions

int GetX ()
 Returns the x coordinate of the mouse cursor on screen. More...
 
int GetY ()
 Returns the y coordinate of the mouse cursor on screen. More...
 
Vec2i GetPos ()
 Returns the position of the mouse cursor on screen. More...
 
bool IsPositionChanged ()
 Returns true if the position of the cursor changed; otherwise returns false. More...
 
int GetWheelX ()
 Returns the value of horizontal wheel. More...
 
int GetWheelY ()
 Returns the value of vertical wheel. More...
 
Vec2i GetWheel ()
 Returns the values of vertical and horizonatal wheel. More...
 
bool IsWheelXChanged ()
 Returns true if the value of horizontal wheel changed; otherwise returns false. More...
 
bool IsWheelYChanged ()
 Returns true if the value of horizontal wheel changed; otherwise returns false. More...
 
bool IsButtonPressed (MouseButton _mouseButton)
 Returns true if the given *_mouse button* is pressed; otherwise returns false. More...
 
bool IsButtonDown (MouseButton _mouseButton)
 Returns true if the given *_mouse button* is hold down; otherwise returns false. More...
 
bool IsButtonReleased (MouseButton _mouseButton)
 Returns true if the given *_mouse button* is released; otherwise returns false. More...
 
void SetCursorSprite (jugimap::Sprite *_cursorSprite)
 Set the cursor sprite to the given *_cursorSprite*. More...
 
void ClearCursorSprite ()
 Clear the cursor sprite. More...
 
SpriteGetCursorSprite ()
 Returns the cursor sprite if exists; otherwise returns nullptr. More...
 
void Reset ()
 Reset all buttons states. More...
 

Detailed Description

The Mouse class provide information about mouse input.

Member Function Documentation

◆ GetX()

int GetX ( )
inline

Returns the x coordinate of the mouse cursor on screen.

◆ GetY()

int GetY ( )
inline

Returns the y coordinate of the mouse cursor on screen.

◆ GetPos()

Vec2i GetPos ( )
inline

Returns the position of the mouse cursor on screen.

◆ IsPositionChanged()

bool IsPositionChanged ( )
inline

Returns true if the position of the cursor changed; otherwise returns false.

◆ GetWheelX()

int GetWheelX ( )
inline

Returns the value of horizontal wheel.

◆ GetWheelY()

int GetWheelY ( )
inline

Returns the value of vertical wheel.

◆ GetWheel()

Vec2i GetWheel ( )
inline

Returns the values of vertical and horizonatal wheel.

◆ IsWheelXChanged()

bool IsWheelXChanged ( )
inline

Returns true if the value of horizontal wheel changed; otherwise returns false.

◆ IsWheelYChanged()

bool IsWheelYChanged ( )
inline

Returns true if the value of horizontal wheel changed; otherwise returns false.

◆ IsButtonPressed()

bool IsButtonPressed ( MouseButton  _mouseButton)
inline

Returns true if the given *_mouse button* is pressed; otherwise returns false.

◆ IsButtonDown()

bool IsButtonDown ( MouseButton  _mouseButton)
inline

Returns true if the given *_mouse button* is hold down; otherwise returns false.

◆ IsButtonReleased()

bool IsButtonReleased ( MouseButton  _mouseButton)
inline

Returns true if the given *_mouse button* is released; otherwise returns false.

◆ SetCursorSprite()

void SetCursorSprite ( jugimap::Sprite _cursorSprite)

Set the cursor sprite to the given *_cursorSprite*.

This function does not hide system cursor. That can be done with EngineApp::SetSystemMouseCursorVisible.

◆ ClearCursorSprite()

void ClearCursorSprite ( )

Clear the cursor sprite.

This function will hide the cursor sprite and set its link pointer to nullptr.

◆ GetCursorSprite()

Sprite* GetCursorSprite ( )
inline

Returns the cursor sprite if exists; otherwise returns nullptr.

◆ Reset()

void Reset ( )

Reset all buttons states.


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