JugiMap Framework
Joystick Class Reference

The Joystick class provide information about joystick input. More...

#include <jmInput.h>

Public Types

enum  POV_X
 POV X values. More...
 
enum  POV_Y
 POV Y values. More...
 

Public Member Functions

bool IsButtonPressed (int _buttonIndex)
 Returns true if a button with the given *_buttonIndex* is pressed; otherwise returns false. More...
 
bool IsButtonDown (int _buttonIndex)
 Returns true if a button with the given *_buttonIndex* is hold down; otherwise returns false. More...
 
bool IsButtonReleased (int _buttonIndex)
 Returns true if a button with the given *_buttonIndex* is released; otherwise returns false. More...
 
bool IsPOV_XPressed (POV_X _povX)
 Returns true if the given *_povX* button is pressed; otherwise returns false. More...
 
bool IsPOV_XDown (POV_X _povX)
 Returns true if the given *_povX* button is hold down; otherwise returns false. More...
 
bool IsPOV_XReleased (POV_X _povX)
 Returns true if the given *_povX* button is released; otherwise returns false. More...
 
bool IsPOV_YPressed (POV_Y _povY)
 Returns true if the given *_povY* button is pressed; otherwise returns false. More...
 
bool IsPOV_YDown (POV_Y _povY)
 Returns true if the given *_povY* button is hold down; otherwise returns false. More...
 
bool IsPOV_YReleased (POV_Y _povY)
 Returns true if the given *_povY* button is released; otherwise returns false. More...
 
float GetXaxis ()
 Returns the value of x axis. More...
 
float GetYaxis ()
 Returns the value of y axis. More...
 
float GetZaxis ()
 Returns the value of z axis. More...
 
bool IsConnected ()
 Returns true if this joystick is connected; otherwise returns false. More...
 
void Reset ()
 Reset all button states. More...
 
std::array< ButtonState, 16 > & GetButtons ()
 Returns a reference to the array of button states. More...
 
std::string GetName ()
 Return the joystick name. More...
 

Detailed Description

The Joystick class provide information about joystick input.

Member Enumeration Documentation

◆ POV_X

enum POV_X
strong

POV X values.

◆ POV_Y

enum POV_Y
strong

POV Y values.

Member Function Documentation

◆ IsButtonPressed()

bool IsButtonPressed ( int  _buttonIndex)
inline

Returns true if a button with the given *_buttonIndex* is pressed; otherwise returns false.

◆ IsButtonDown()

bool IsButtonDown ( int  _buttonIndex)
inline

Returns true if a button with the given *_buttonIndex* is hold down; otherwise returns false.

◆ IsButtonReleased()

bool IsButtonReleased ( int  _buttonIndex)
inline

Returns true if a button with the given *_buttonIndex* is released; otherwise returns false.

◆ IsPOV_XPressed()

bool IsPOV_XPressed ( POV_X  _povX)
inline

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

◆ IsPOV_XDown()

bool IsPOV_XDown ( POV_X  _povX)
inline

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

◆ IsPOV_XReleased()

bool IsPOV_XReleased ( POV_X  _povX)
inline

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

◆ IsPOV_YPressed()

bool IsPOV_YPressed ( POV_Y  _povY)
inline

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

◆ IsPOV_YDown()

bool IsPOV_YDown ( POV_Y  _povY)
inline

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

◆ IsPOV_YReleased()

bool IsPOV_YReleased ( POV_Y  _povY)
inline

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

◆ GetXaxis()

float GetXaxis ( )
inline

Returns the value of x axis.

◆ GetYaxis()

float GetYaxis ( )
inline

Returns the value of y axis.

◆ GetZaxis()

float GetZaxis ( )
inline

Returns the value of z axis.

◆ IsConnected()

bool IsConnected ( )
inline

Returns true if this joystick is connected; otherwise returns false.

◆ Reset()

void Reset ( )

Reset all button states.

◆ GetButtons()

std::array<ButtonState,16>& GetButtons ( )
inline

Returns a reference to the array of button states.

◆ GetName()

std::string GetName ( )
inline

Return the joystick name.

This function does not provide the real joystick name on all engines.


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