MPMA Framework 0.4
Classes | Namespaces | Functions
GameDevice.h File Reference

Input for joysticks and gamepads. Note that all input relies on the window being set up first. More...

Go to the source code of this file.

Classes

class  INPUT::GAME::AxisSet
 Represents a set of related axes on a device. More...
class  INPUT::GAME::Button
 Represents a button on a device. More...
class  INPUT::GAME::Device
 Represents a game device, such as a joystick or gamepad. More...

Namespaces

namespace  INPUT
 

Input.


namespace  INPUT::GAME
 

Game devices.


Functions

std::list< Device > & INPUT::GAME::GetDevices ()
 Returns all devices. Note that the pointers to the axes/buttons of the devices are always valid and constant while MPMA is in an initialized state.
void INPUT::GAME::EnableAutoPoll (bool enable)
 Enables or disables auto-polling of all devices each frame. The default is to auto-poll, in which case it is never neccesary to manually call PollAllDevices.
void INPUT::GAME::PollAllDevices ()
 Updates the data for all axes in buttons in all Devices. This also updates the list of currently and newly pressed buttons and axes.
const std::vector< const
Button * > & 
INPUT::GAME::GetCurrentlyPressedButtons ()
 Returns a list of buttons that are currently pressed.
const std::vector< const
Button * > & 
INPUT::GAME::GetNewlyPressedButtons ()
 Returns a list of buttons that were newly pressed since the last call to PollAllDevices.
const std::vector< const
AxisSet * > & 
INPUT::GAME::GetCurrentlyPressedAxes ()
 Returns a list of axis sets that are currently pressed.
const std::vector< const
AxisSet * > & 
INPUT::GAME::GetNewlyPressedAxes ()
 Returns a list of axis sets that were newly pressed since the last call to PollAllDevices.
Device * INPUT::GAME::FindDevice (const std::string &identifierToFind)
 Finds a device given its persistent identifier. Returns 0 if not found.
Button * INPUT::GAME::FindButton (const std::string &identifierToFind)
 Finds a button given its persistent identifier. Returns 0 if not found.
AxisSet * INPUT::GAME::FindAxisSet (const std::string &identifierToFind)
 Finds an axis set given its persistent identifier. Returns 0 if not found.

Detailed Description

Input for joysticks and gamepads. Note that all input relies on the window being set up first.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends