#include <src/core/input/SimpleInputState.h>
Public Member Functions | |
bool | setHandler (InputHandler *handler) |
Adds a handler of any kind. dynamic_cast determines to which list it is added. | |
bool | setJoyStickHandler (JoyStickHandler *handler) |
Adds a joy stick handler. | |
bool | setJoyStickHandler (JoyStickHandler *handler, unsigned int joyStickID) |
Adds a joy stick handler. | |
void | setKeyHandler (KeyHandler *handler) |
void | setMouseHandler (MouseHandler *handler) |
Private Member Functions | |
void | joyStickAxisMoved (unsigned int joyStickID, unsigned int axis, float value) |
void | joyStickButtonHeld (unsigned int joyStickID, JoyStickButtonCode::ByEnum id) |
void | joyStickButtonPressed (unsigned int joyStickID, JoyStickButtonCode::ByEnum id) |
void | joyStickButtonReleased (unsigned int joyStickID, JoyStickButtonCode::ByEnum id) |
void | keyHeld (const KeyEvent &evt) |
void | keyPressed (const KeyEvent &evt) |
void | keyReleased (const KeyEvent &evt) |
void | mouseButtonHeld (MouseButtonCode::ByEnum id) |
void | mouseButtonPressed (MouseButtonCode::ByEnum id) |
void | mouseButtonReleased (MouseButtonCode::ByEnum id) |
void | mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize) |
void | mouseScrolled (int abs, int rel) |
void | numberOfJoySticksChanged (unsigned int n) |
void | onEnter () |
void | onLeave () |
SimpleInputState () | |
void | update () |
void | updateInput (float dt, unsigned int device) |
void | updateInput (float dt) |
~SimpleInputState () | |
Private Attributes | |
std::vector< InputHandler * > | allHandlers_ |
std::vector< JoyStickHandler * > | joyStickHandler_ |
JoyStickHandler * | joyStickHandlerAll_ |
KeyHandler * | keyHandler_ |
MouseHandler * | mouseHandler_ |
Friends | |
class | InputManager |
orxonox::SimpleInputState::SimpleInputState | ( | ) | [private] |
orxonox::SimpleInputState::~SimpleInputState | ( | ) | [inline, private] |
void orxonox::SimpleInputState::joyStickAxisMoved | ( | unsigned int | joyStickID, | |
unsigned int | axis, | |||
float | value | |||
) | [inline, private, virtual] |
void orxonox::SimpleInputState::joyStickButtonHeld | ( | unsigned int | joyStickID, | |
JoyStickButtonCode::ByEnum | id | |||
) | [inline, private, virtual] |
void orxonox::SimpleInputState::joyStickButtonPressed | ( | unsigned int | joyStickID, | |
JoyStickButtonCode::ByEnum | id | |||
) | [inline, private, virtual] |
void orxonox::SimpleInputState::joyStickButtonReleased | ( | unsigned int | joyStickID, | |
JoyStickButtonCode::ByEnum | id | |||
) | [inline, private, virtual] |
void orxonox::SimpleInputState::keyHeld | ( | const KeyEvent & | evt | ) | [inline, private, virtual] |
void orxonox::SimpleInputState::keyPressed | ( | const KeyEvent & | evt | ) | [private, virtual] |
void orxonox::SimpleInputState::keyReleased | ( | const KeyEvent & | evt | ) | [inline, private, virtual] |
void orxonox::SimpleInputState::mouseButtonHeld | ( | MouseButtonCode::ByEnum | id | ) | [inline, private, virtual] |
Implements orxonox::InputState.
References orxonox::MouseHandler::mouseButtonHeld(), and mouseHandler_.
void orxonox::SimpleInputState::mouseButtonPressed | ( | MouseButtonCode::ByEnum | id | ) | [inline, private, virtual] |
Implements orxonox::InputState.
References orxonox::MouseHandler::mouseButtonPressed(), and mouseHandler_.
void orxonox::SimpleInputState::mouseButtonReleased | ( | MouseButtonCode::ByEnum | id | ) | [inline, private, virtual] |
Implements orxonox::InputState.
References orxonox::MouseHandler::mouseButtonReleased(), and mouseHandler_.
void orxonox::SimpleInputState::mouseMoved | ( | IntVector2 | abs, | |
IntVector2 | rel, | |||
IntVector2 | clippingSize | |||
) | [inline, private, virtual] |
void orxonox::SimpleInputState::mouseScrolled | ( | int | abs, | |
int | rel | |||
) | [inline, private, virtual] |
Implements orxonox::InputState.
References mouseHandler_, and orxonox::MouseHandler::mouseScrolled().
void orxonox::SimpleInputState::numberOfJoySticksChanged | ( | unsigned int | n | ) | [private, virtual] |
void orxonox::SimpleInputState::onEnter | ( | ) | [private, virtual] |
void orxonox::SimpleInputState::onLeave | ( | ) | [private, virtual] |
bool orxonox::SimpleInputState::setHandler | ( | InputHandler * | handler | ) |
Adds a handler of any kind. dynamic_cast determines to which list it is added.
handler | Pointer to the handler object. |
References setJoyStickHandler(), setKeyHandler(), and setMouseHandler().
Referenced by orxonox::GSMainMenu::activate(), orxonox::GSLevel::activate(), orxonox::GSLevel::deactivate(), orxonox::GSGraphics::deactivate(), and orxonox::InputManager::initialise().
bool orxonox::SimpleInputState::setJoyStickHandler | ( | JoyStickHandler * | handler | ) |
Adds a joy stick handler.
handler | Pointer to the handler object. |
References joyStickHandler_, joyStickHandlerAll_, setJoyStickHandler(), and update().
bool orxonox::SimpleInputState::setJoyStickHandler | ( | JoyStickHandler * | handler, | |
unsigned int | joyStickID | |||
) |
Adds a joy stick handler.
handler | Pointer to the handler object. | |
joyStickID | ID of the joy stick |
References joyStickHandler_, and update().
Referenced by orxonox::GSMainMenu::activate(), orxonox::InGameConsole::bHidesAllInputChanged(), setHandler(), and setJoyStickHandler().
void orxonox::SimpleInputState::setKeyHandler | ( | KeyHandler * | handler | ) | [inline] |
void orxonox::SimpleInputState::setMouseHandler | ( | MouseHandler * | handler | ) | [inline] |
Referenced by orxonox::GSLevel::activate(), orxonox::InGameConsole::bHidesAllInputChanged(), and setHandler().
void orxonox::SimpleInputState::update | ( | ) | [private] |
void orxonox::SimpleInputState::updateInput | ( | float | dt, | |
unsigned int | device | |||
) | [inline, private, virtual] |
void orxonox::SimpleInputState::updateInput | ( | float | dt | ) | [inline, private, virtual] |
friend class InputManager [friend] |
Reimplemented from orxonox::InputState.
std::vector<InputHandler*> orxonox::SimpleInputState::allHandlers_ [private] |
Referenced by update(), and updateInput().
std::vector<JoyStickHandler*> orxonox::SimpleInputState::joyStickHandler_ [private] |
Referenced by numberOfJoySticksChanged(), and setJoyStickHandler().
KeyHandler* orxonox::SimpleInputState::keyHandler_ [private] |
Referenced by keyHeld(), keyPressed(), keyReleased(), update(), and updateInput().
Referenced by mouseButtonHeld(), mouseButtonPressed(), mouseButtonReleased(), mouseMoved(), mouseScrolled(), update(), and updateInput().