OpenMW
|
Class that handles all input and key bindings for OpenMW. More...
#include <inputmanagerimp.hpp>
Public Member Functions | |
InputManager (OEngine::Render::OgreRenderer &_ogre, OMW::Engine &engine, const std::string &userFile, bool userFileExists, bool grab) | |
virtual | ~InputManager () |
virtual void | update (float dt, bool loading) |
void | setPlayer (MWWorld::Player *player) |
virtual void | changeInputMode (bool guiMode) |
virtual void | processChangedSettings (const Settings::CategorySettingVector &changed) |
virtual void | setDragDrop (bool dragDrop) |
virtual void | toggleControlSwitch (const std::string &sw, bool value) |
virtual bool | getControlSwitch (const std::string &sw) |
virtual std::string | getActionDescription (int action) |
virtual std::string | getActionBindingName (int action) |
virtual int | getNumActions () |
virtual std::vector< int > | getActionSorting () |
virtual void | enableDetectingBindingMode (int action) |
virtual void | resetToDefaultBindings () |
virtual bool | keyPressed (const SDL_KeyboardEvent &arg) |
virtual bool | keyReleased (const SDL_KeyboardEvent &arg) |
virtual void | textInput (const SDL_TextInputEvent &arg) |
virtual bool | mousePressed (const SDL_MouseButtonEvent &arg, Uint8 id) |
virtual bool | mouseReleased (const SDL_MouseButtonEvent &arg, Uint8 id) |
virtual bool | mouseMoved (const SFO::MouseMotionEvent &arg) |
virtual void | windowVisibilityChange (bool visible) |
virtual void | windowFocusChange (bool have_focus) |
virtual void | windowResized (int x, int y) |
virtual void | windowClosed () |
virtual void | channelChanged (ICS::Channel *channel, float currentValue, float previousValue) |
virtual void | mouseAxisBindingDetected (ICS::InputControlSystem *ICS, ICS::Control *control, ICS::InputControlSystem::NamedAxis axis, ICS::Control::ControlChangingDirection direction) |
virtual void | keyBindingDetected (ICS::InputControlSystem *ICS, ICS::Control *control, SDL_Keycode key, ICS::Control::ControlChangingDirection direction) |
virtual void | mouseButtonBindingDetected (ICS::InputControlSystem *ICS, ICS::Control *control, unsigned int button, ICS::Control::ControlChangingDirection direction) |
virtual void | joystickAxisBindingDetected (ICS::InputControlSystem *ICS, ICS::Control *control, int deviceId, int axis, ICS::Control::ControlChangingDirection direction) |
virtual void | joystickButtonBindingDetected (ICS::InputControlSystem *ICS, ICS::Control *control, int deviceId, unsigned int button, ICS::Control::ControlChangingDirection direction) |
virtual void | joystickPOVBindingDetected (ICS::InputControlSystem *ICS, ICS::Control *control, int deviceId, int pov, ICS::InputControlSystem::POVAxis axis, ICS::Control::ControlChangingDirection direction) |
virtual void | joystickSliderBindingDetected (ICS::InputControlSystem *ICS, ICS::Control *control, int deviceId, int slider, ICS::Control::ControlChangingDirection direction) |
void | clearAllBindings (ICS::Control *control) |
Private Types | |
enum | Actions { A_GameMenu, A_Unused, A_Screenshot, A_Inventory, A_Console, A_MoveLeft, A_MoveRight, A_MoveForward, A_MoveBackward, A_Activate, A_Use, A_Jump, A_AutoMove, A_Rest, A_Journal, A_Weapon, A_Spell, A_Run, A_CycleSpellLeft, A_CycleSpellRight, A_CycleWeaponLeft, A_CycleWeaponRight, A_ToggleSneak, A_AlwaysRun, A_Sneak, A_QuickSave, A_QuickLoad, A_QuickMenu, A_ToggleWeapon, A_ToggleSpell, A_TogglePOV, A_QuickKey1, A_QuickKey2, A_QuickKey3, A_QuickKey4, A_QuickKey5, A_QuickKey6, A_QuickKey7, A_QuickKey8, A_QuickKey9, A_QuickKey10, A_QuickKeysMenu, A_ToggleHUD, A_Last } |
Private Member Functions | |
void | adjustMouseRegion (int width, int height) |
MyGUI::MouseButton | sdlButtonToMyGUI (Uint8 button) |
void | resetIdleTime () |
void | updateIdleTime (float dt) |
void | toggleMainMenu () |
void | toggleSpell () |
void | toggleWeapon () |
void | toggleInventory () |
void | toggleContainer () |
void | toggleConsole () |
void | screenshot () |
void | toggleJournal () |
void | activate () |
void | toggleWalking () |
void | toggleAutoMove () |
void | rest () |
void | quickKey (int index) |
void | showQuickKeysMenu () |
bool | actionIsActive (int id) |
void | loadKeyDefaults (bool force=false) |
Private Attributes | |
OEngine::Render::OgreRenderer & | mOgre |
MWWorld::Player * | mPlayer |
OMW::Engine & | mEngine |
ICS::InputControlSystem * | mInputBinder |
SFO::InputWrapper * | mInputManager |
std::string | mUserFile |
bool | mDragDrop |
bool | mGrabCursor |
bool | mInvertY |
float | mCameraSensitivity |
float | mUISensitivity |
float | mCameraYMultiplier |
float | mPreviewPOVDelay |
float | mTimeIdle |
bool | mMouseLookEnabled |
bool | mGuiCursorEnabled |
float | mOverencumberedMessageDelay |
float | mMouseX |
float | mMouseY |
int | mMouseWheel |
bool | mUserFileExists |
bool | mAlwaysRunActive |
std::map< std::string, bool > | mControlSwitch |
Class that handles all input and key bindings for OpenMW.
enum MWInput::InputManager::Actions [private] |
MWInput::InputManager::InputManager | ( | OEngine::Render::OgreRenderer & | _ogre, |
OMW::Engine & | engine, | ||
const std::string & | userFile, | ||
bool | userFileExists, | ||
bool | grab | ||
) |
MWInput::InputManager::~InputManager | ( | ) | [virtual] |
Reimplemented from MWBase::InputManager.
bool MWInput::InputManager::actionIsActive | ( | int | id | ) | [private] |
void MWInput::InputManager::activate | ( | ) | [private] |
void MWInput::InputManager::adjustMouseRegion | ( | int | width, |
int | height | ||
) | [private] |
void MWInput::InputManager::changeInputMode | ( | bool | guiMode | ) | [virtual] |
Implements MWBase::InputManager.
void MWInput::InputManager::channelChanged | ( | ICS::Channel * | channel, |
float | currentValue, | ||
float | previousValue | ||
) | [virtual] |
void MWInput::InputManager::clearAllBindings | ( | ICS::Control * | control | ) |
void MWInput::InputManager::enableDetectingBindingMode | ( | int | action | ) | [virtual] |
Implements MWBase::InputManager.
std::string MWInput::InputManager::getActionBindingName | ( | int | action | ) | [virtual] |
Implements MWBase::InputManager.
std::string MWInput::InputManager::getActionDescription | ( | int | action | ) | [virtual] |
Implements MWBase::InputManager.
std::vector< int > MWInput::InputManager::getActionSorting | ( | ) | [virtual] |
Implements MWBase::InputManager.
bool MWInput::InputManager::getControlSwitch | ( | const std::string & | sw | ) | [virtual] |
Implements MWBase::InputManager.
virtual int MWInput::InputManager::getNumActions | ( | ) | [inline, virtual] |
Implements MWBase::InputManager.
void MWInput::InputManager::joystickAxisBindingDetected | ( | ICS::InputControlSystem * | ICS, |
ICS::Control * | control, | ||
int | deviceId, | ||
int | axis, | ||
ICS::Control::ControlChangingDirection | direction | ||
) | [virtual] |
void MWInput::InputManager::joystickButtonBindingDetected | ( | ICS::InputControlSystem * | ICS, |
ICS::Control * | control, | ||
int | deviceId, | ||
unsigned int | button, | ||
ICS::Control::ControlChangingDirection | direction | ||
) | [virtual] |
void MWInput::InputManager::joystickPOVBindingDetected | ( | ICS::InputControlSystem * | ICS, |
ICS::Control * | control, | ||
int | deviceId, | ||
int | pov, | ||
ICS::InputControlSystem::POVAxis | axis, | ||
ICS::Control::ControlChangingDirection | direction | ||
) | [virtual] |
void MWInput::InputManager::joystickSliderBindingDetected | ( | ICS::InputControlSystem * | ICS, |
ICS::Control * | control, | ||
int | deviceId, | ||
int | slider, | ||
ICS::Control::ControlChangingDirection | direction | ||
) | [virtual] |
void MWInput::InputManager::keyBindingDetected | ( | ICS::InputControlSystem * | ICS, |
ICS::Control * | control, | ||
SDL_Keycode | key, | ||
ICS::Control::ControlChangingDirection | direction | ||
) | [virtual] |
bool MWInput::InputManager::keyPressed | ( | const SDL_KeyboardEvent & | arg | ) | [virtual] |
bool MWInput::InputManager::keyReleased | ( | const SDL_KeyboardEvent & | arg | ) | [virtual] |
void MWInput::InputManager::loadKeyDefaults | ( | bool | force = false | ) | [private] |
void MWInput::InputManager::mouseAxisBindingDetected | ( | ICS::InputControlSystem * | ICS, |
ICS::Control * | control, | ||
ICS::InputControlSystem::NamedAxis | axis, | ||
ICS::Control::ControlChangingDirection | direction | ||
) | [virtual] |
void MWInput::InputManager::mouseButtonBindingDetected | ( | ICS::InputControlSystem * | ICS, |
ICS::Control * | control, | ||
unsigned int | button, | ||
ICS::Control::ControlChangingDirection | direction | ||
) | [virtual] |
bool MWInput::InputManager::mouseMoved | ( | const SFO::MouseMotionEvent & | arg | ) | [virtual] |
bool MWInput::InputManager::mousePressed | ( | const SDL_MouseButtonEvent & | arg, |
Uint8 | id | ||
) | [virtual] |
bool MWInput::InputManager::mouseReleased | ( | const SDL_MouseButtonEvent & | arg, |
Uint8 | id | ||
) | [virtual] |
void MWInput::InputManager::processChangedSettings | ( | const Settings::CategorySettingVector & | changed | ) | [virtual] |
Implements MWBase::InputManager.
void MWInput::InputManager::quickKey | ( | int | index | ) | [private] |
void MWInput::InputManager::resetIdleTime | ( | ) | [private] |
void MWInput::InputManager::resetToDefaultBindings | ( | ) | [virtual] |
Implements MWBase::InputManager.
void MWInput::InputManager::rest | ( | ) | [private] |
void MWInput::InputManager::screenshot | ( | ) | [private] |
MyGUI::MouseButton MWInput::InputManager::sdlButtonToMyGUI | ( | Uint8 | button | ) | [private] |
void MWInput::InputManager::setDragDrop | ( | bool | dragDrop | ) | [virtual] |
Implements MWBase::InputManager.
void MWInput::InputManager::setPlayer | ( | MWWorld::Player * | player | ) | [inline] |
void MWInput::InputManager::showQuickKeysMenu | ( | ) | [private] |
void MWInput::InputManager::textInput | ( | const SDL_TextInputEvent & | arg | ) | [virtual] |
void MWInput::InputManager::toggleAutoMove | ( | ) | [private] |
void MWInput::InputManager::toggleConsole | ( | ) | [private] |
void MWInput::InputManager::toggleContainer | ( | ) | [private] |
void MWInput::InputManager::toggleControlSwitch | ( | const std::string & | sw, |
bool | value | ||
) | [virtual] |
maybe crouching at this time
Implements MWBase::InputManager.
void MWInput::InputManager::toggleInventory | ( | ) | [private] |
void MWInput::InputManager::toggleJournal | ( | ) | [private] |
void MWInput::InputManager::toggleMainMenu | ( | ) | [private] |
void MWInput::InputManager::toggleSpell | ( | ) | [private] |
void MWInput::InputManager::toggleWalking | ( | ) | [private] |
void MWInput::InputManager::toggleWeapon | ( | ) | [private] |
void MWInput::InputManager::update | ( | float | dt, |
bool | loading | ||
) | [virtual] |
Implements MWBase::InputManager.
void MWInput::InputManager::updateIdleTime | ( | float | dt | ) | [private] |
void MWInput::InputManager::windowClosed | ( | ) | [virtual] |
void MWInput::InputManager::windowFocusChange | ( | bool | have_focus | ) | [virtual] |
void MWInput::InputManager::windowResized | ( | int | x, |
int | y | ||
) | [virtual] |
void MWInput::InputManager::windowVisibilityChange | ( | bool | visible | ) | [virtual] |
bool MWInput::InputManager::mAlwaysRunActive [private] |
float MWInput::InputManager::mCameraSensitivity [private] |
float MWInput::InputManager::mCameraYMultiplier [private] |
std::map<std::string, bool> MWInput::InputManager::mControlSwitch [private] |
bool MWInput::InputManager::mDragDrop [private] |
OMW::Engine& MWInput::InputManager::mEngine [private] |
bool MWInput::InputManager::mGrabCursor [private] |
bool MWInput::InputManager::mGuiCursorEnabled [private] |
ICS::InputControlSystem* MWInput::InputManager::mInputBinder [private] |
SFO::InputWrapper* MWInput::InputManager::mInputManager [private] |
bool MWInput::InputManager::mInvertY [private] |
bool MWInput::InputManager::mMouseLookEnabled [private] |
int MWInput::InputManager::mMouseWheel [private] |
float MWInput::InputManager::mMouseX [private] |
float MWInput::InputManager::mMouseY [private] |
float MWInput::InputManager::mOverencumberedMessageDelay [private] |
MWWorld::Player* MWInput::InputManager::mPlayer [private] |
float MWInput::InputManager::mPreviewPOVDelay [private] |
float MWInput::InputManager::mTimeIdle [private] |
float MWInput::InputManager::mUISensitivity [private] |
std::string MWInput::InputManager::mUserFile [private] |
bool MWInput::InputManager::mUserFileExists [private] |