#include <src/core/input/Button.h>
Public Member Functions | |
virtual bool | addParamCommand (ParamCommand *command) |
Button () | |
virtual void | clear () |
bool | execute (KeybindMode::Value mode, float abs=1.0f, float rel=1.0f) |
void | parse () |
void | readConfigValue (ConfigFileType configFile) |
virtual | ~Button () |
Public Attributes | |
bool | bButtonThresholdUser_ |
std::string | bindingString_ |
The configured string value. | |
float | buttonThreshold_ |
BaseCommand ** | commands_ [3] |
Basic commands for OnPress, OnHold and OnRelease. | |
ConfigValueContainer * | configContainer_ |
Container to allow for better configValue support. | |
std::string | groupName_ |
Name of the group of input triggers. | |
std::string | name_ |
Name of the trigger as strings. | |
unsigned int | nCommands_ [3] |
Number of basic commands. | |
std::vector < BufferedParamCommand * > * | paramCommandBuffer_ |
Pointer to the list of parametrised commands. | |
Private Member Functions | |
void | parseError (std::string message, bool serious) |
orxonox::Button::Button | ( | ) |
References clear(), configContainer_, and nCommands_.
orxonox::Button::~Button | ( | ) | [virtual] |
References clear(), and configContainer_.
virtual bool orxonox::Button::addParamCommand | ( | ParamCommand * | command | ) | [inline, virtual] |
void orxonox::Button::clear | ( | ) | [virtual] |
Reimplemented in orxonox::HalfAxis.
References commands_, and nCommands_.
Referenced by Button(), orxonox::HalfAxis::clear(), parse(), and ~Button().
bool orxonox::Button::execute | ( | KeybindMode::Value | mode, | |
float | abs = 1.0f , |
|||
float | rel = 1.0f | |||
) | [inline] |
void orxonox::Button::parse | ( | ) |
References addParamCommand(), bButtonThresholdUser_, bindingString_, buttonThreshold_, clear(), commands_, orxonox::convertValue(), orxonox::CommandExecutor::evaluate(), orxonox::SimpleCommand::evaluation_, orxonox::BufferedParamCommand::evaluation_, orxonox::CommandEvaluation::getConsoleCommand(), orxonox::ConsoleCommand::getInputConfiguredParam_(), orxonox::ConsoleCommand::getKeybindMode(), orxonox::getLowercase(), orxonox::isEmpty(), orxonox::CommandEvaluation::isValid(), nCommands_, orxonox::KeybindMode::None, orxonox::KeybindMode::OnHold, orxonox::KeybindMode::OnPress, orxonox::KeybindMode::OnRelease, orxonox::ParamCommand::paramCommand_, paramCommandBuffer_, orxonox::BufferedParamCommand::paramIndex_, parseError(), orxonox::ParamCommand::scale_, orxonox::SubString::size(), and orxonox::SubString::WhiteSpaces.
Referenced by readConfigValue().
void orxonox::Button::parseError | ( | std::string | message, | |
bool | serious | |||
) | [inline, private] |
void orxonox::Button::readConfigValue | ( | ConfigFileType | configFile | ) |
Referenced by parse().
Says how much it takes for an analog axis to trigger a button Note: This variable is here to have only one parse() function.
Referenced by parse(), and orxonox::KeyBinder::tickHalfAxis().
Container to allow for better configValue support.
Referenced by Button(), readConfigValue(), and ~Button().
Name of the group of input triggers.
Referenced by orxonox::KeyBinder::KeyBinder(), and readConfigValue().
Name of the trigger as strings.
Referenced by orxonox::KeyBinder::compilePointerLists(), orxonox::KeyBinder::KeyBinder(), orxonox::KeyBinder::keyHeld(), orxonox::KeyBinder::keyPressed(), orxonox::KeyBinder::keyReleased(), parseError(), and readConfigValue().
unsigned int orxonox::Button::nCommands_[3] |
Number of basic commands.
Referenced by Button(), clear(), execute(), parse(), and orxonox::KeyBinder::tickHalfAxis().
std::vector<BufferedParamCommand*>* orxonox::Button::paramCommandBuffer_ |
Pointer to the list of parametrised commands.
Referenced by orxonox::KeyBinder::KeyBinder(), and parse().