![]() |
Classes | |
struct | gamepad::config_status_t |
specifies the current status of gamepad configuration More... | |
class | gamepad::Configurator |
Enumerations | |
enum | gamepad::eInstruction { gamepad::eInstruction_Calibrate = 0x401, gamepad::eInstruction_ButtonPress = 0x111, gamepad::eInstruction_DpadCenter = 0x310, gamepad::eInstruction_DpadLeft = 0x311, gamepad::eInstruction_DpadRight = 0x312, gamepad::eInstruction_DpadUp = 0x313, gamepad::eInstruction_DpadDown = 0x314, gamepad::eInstruction_JoyCenter = 0x320, gamepad::eInstruction_JoyLeft = 0x321, gamepad::eInstruction_JoyUp = 0x322, gamepad::eInstruction_PotCenter = 0x330, gamepad::eInstruction_PotExtreme = 0x331, gamepad::eInstruction_RequestControl = 0x100, gamepad::eInstruction_PressMainAction = 0x200, gamepad::eInstruction_ExternalEvent = 0x400, gamepad::eInstruction_Invalid = 0 } |
instruction set for user More... | |
Functions | |
void | gamepad::config_status_t::clear (void) throw () |
virtual void | gamepad::Configurator::reset (void)=0 |
call this to reset configuration state and go back to calibration | |
virtual bool | gamepad::Configurator::update (OUT config_status_t &status)=0 |
call this frequently (multiple times per second). | |
virtual void | gamepad::Configurator::calibrationComplete (void)=0 |
if the current instruction is eInstruction_Calibrate, you can only move to the next step by calling this method. | |
virtual smart_ptr< Map > | gamepad::Configurator::getMapping (void)=0 |
once done, call this to get the mapping | |
static smart_ptr< Configurator > | gamepad::Configurator::create (IN smart_ptr< Manager > &mgr, IN smart_ptr< SourceDevice > &device, IN smart_ptr< Type > &type, IN const char *name) |
walk through and configure a mapping to the specified gamepad type, from the specified device. | |
const char * | gamepad::getInstructionToken (IN eInstruction instruct) |
handy string token given enum (can be used as key for localized string) | |
Variables | |
int | gamepad::config_status_t::currStep |
current step of config (first is 0) | |
int | gamepad::config_status_t::maxSteps |
total number of configuration steps | |
eInstruction | gamepad::config_status_t::instruct |
what user should do | |
const char * | gamepad::config_status_t::primary |
logical name of primary button | |
const char * | gamepad::config_status_t::logical |
logical input being configured |
instruction set for user
Definition at line 51 of file gamepad-config.h.
void gamepad::config_status_t::clear | ( | void | ) | throw () [inline, inherited] |
Definition at line 92 of file gamepad-config.h.
virtual void gamepad::Configurator::reset | ( | void | ) | [pure virtual, inherited] |
call this to reset configuration state and go back to calibration
virtual bool gamepad::Configurator::update | ( | OUT config_status_t & | status | ) | [pure virtual, inherited] |
call this frequently (multiple times per second).
Returns false when the configurator is done.
virtual void gamepad::Configurator::calibrationComplete | ( | void | ) | [pure virtual, inherited] |
if the current instruction is eInstruction_Calibrate, you can only move to the next step by calling this method.
This should be called once all controls have been moved/pressed, and all controls are currently released (no buttons pressed, joysticks pushed off center, etc.). So the Configurator knows it is now safe to take a snapshot of gamepad state.
virtual smart_ptr<Map> gamepad::Configurator::getMapping | ( | void | ) | [pure virtual, inherited] |
once done, call this to get the mapping
smart_ptr< Configurator > gamepad::Configurator::create | ( | IN smart_ptr< Manager > & | mgr, | |
IN smart_ptr< SourceDevice > & | device, | |||
IN smart_ptr< Type > & | type, | |||
IN const char * | name | |||
) | [static, inherited] |
walk through and configure a mapping to the specified gamepad type, from the specified device.
Caller also supplies a friendly name for the mapping.
Definition at line 946 of file gamepad-config.cpp.
const char * gamepad::getInstructionToken | ( | IN eInstruction | instruct | ) |
handy string token given enum (can be used as key for localized string)
int gamepad::config_status_t::currStep [inherited] |
current step of config (first is 0)
Definition at line 101 of file gamepad-config.h.
int gamepad::config_status_t::maxSteps [inherited] |
total number of configuration steps
Definition at line 102 of file gamepad-config.h.
eInstruction gamepad::config_status_t::instruct [inherited] |
what user should do
Definition at line 103 of file gamepad-config.h.
const char* gamepad::config_status_t::primary [inherited] |
logical name of primary button
Definition at line 104 of file gamepad-config.h.
const char* gamepad::config_status_t::logical [inherited] |
logical input being configured
Definition at line 105 of file gamepad-config.h.