Jopnal Engine  alpha 0.4
Simple Component Based 2D/3D Game Engine
Classes | Static Public Member Functions | List of all members
jop::Controller Class Reference

#include <Controller.hpp>

Classes

struct  Playstation
 
struct  XBox
 

Static Public Member Functions

static int controllersPresent ()
 Check how many controllers are connected. More...
 
static bool isControllerPresent (const int index)
 Check if specific controller is connected. More...
 
static bool isButtonDown (const int index, const int button)
 Check if a controller button is currently pressed. More...
 
static float getAxisOffset (const int index, const int axis)
 Get an axis offset. More...
 

Detailed Description

Definition at line 34 of file Controller.hpp.

Member Function Documentation

static int jop::Controller::controllersPresent ( )
static

Check how many controllers are connected.

Returns
Number of controllers
static float jop::Controller::getAxisOffset ( const int  index,
const int  axis 
)
static

Get an axis offset.

Parameters
indexThe index if the controller
axisThe axis
Returns
The axis offsed, between -1 and 1
static bool jop::Controller::isButtonDown ( const int  index,
const int  button 
)
static

Check if a controller button is currently pressed.

Parameters
indexThe controller index
buttonThe controller button
Returns
True if currently pressed
static bool jop::Controller::isControllerPresent ( const int  index)
static

Check if specific controller is connected.

Parameters
indexThe index of the controller to check
Returns
True if connected

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