Input Class Reference

#include <Input.h>

Description

Singleton class for querying input devices.

Static Functions

static int GetLastUnicode ()
 
static std::vector< PadID > QueryPads ()
 
static void UnmapInput (const std::string &id)
 
static void AddListener (ButtonListener *, Keyboard)
 
static void RemoveListener (ButtonListener *)
 
static float GetPadAxis (PadID, PadAxes)
 
static bool LockInput (float sec)
 
static void Update ()
 
static InputManager * GetManager ()
 
IsPressed()

Returns whether or not the input was pressed.

static bool IsPressed (Keyboard)
 
static bool IsPressed (MouseButtons)
 
static bool IsPressed (PadID, PadButtons)
 
static bool IsPressed (const std::string &)
 
GetState()

Returns the current state of the device button, where true means the the button is activated and false returns if otherwise.

static bool GetState (Keyboard)
 
static bool GetState (MouseButtons)
 
static bool GetState (PadID, PadButtons)
 
static bool GetState (const std::string &)
 
IsHeld

Returns whether or not the input is currently being held.

static bool IsHeld (Keyboard)
 
static bool IsHeld (MouseButtons)
 
static bool IsHeld (PadID, PadButtons)
 
static bool IsHeld (const std::string &)
 
MapInput()

Maps a data value to an input. The value may be queried to the specified input.

static void MapInput (const std::string &id, Keyboard)
 
static void MapInput (const std::string &id, MouseButtons)
 
static void MapInput (const std::string &id, PadID, PadButtons)
 
Mouse Convenience Functions
static int MouseX ()
 
static int MouseY ()
 
static int MouseXDelta ()
 
static int MouseYDelta ()
 
static int MouseWheel ()
 

Member Function Documentation

static int GetLastUnicode ( )
static

Returns the last Ascii code from keyboard.

Once this is called, it will return 0 unless another unicode key is pressed on the keyboard input

static std::vector<PadID> QueryPads ( )
static

Retrieves the a list of all valid Gamepads.

static void UnmapInput ( const std::string &  id)
static

Disassociates a string with its corresponding InputID if any.

static void AddListener ( ButtonListener ,
Keyboard   
)
static

Maps an InputCallback to the specifed key.

Only one InputCallback may be associated with a given InputID.

static void RemoveListener ( ButtonListener )
static

Disassociates the corresponding InputCallback if any.

static int MouseX ( )
static

Current X position of the Mouse.

static int MouseY ( )
static

Current Y position of the Mouse.

static int MouseXDelta ( )
static

Returns the change in X position since last update.

static int MouseYDelta ( )
static

Returns the change in Y position since the last update.

static int MouseWheel ( )
static

Returns the current state of the mouse wheel.

If the wheel is neutral, 0 is returned. If scrolling up, 1 is returned, and if scrolling down, -1.

static float GetPadAxis ( PadID  ,
PadAxes   
)
static

Returns the axis tilt amount. The range is from -1 to 1.

static bool LockInput ( float  sec)
static

Prevents the updating of Input until the time expires.

static void Update ( )
static

Update the state of input. This is done for you.

static InputManager* GetManager ( )
static

Returns the system-dependent object that handles input requests.


The documentation for this class was generated from the following file:
  • /home/jc/git/Dynacoe/DynacoeSrc/includes/Dynacoe/Modules/Input.h