mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 09:23:53 +00:00
Fix controls disabling
This commit is contained in:
parent
2f2b3173e3
commit
0eb24da2e7
3 changed files with 3 additions and 9 deletions
|
@ -216,9 +216,9 @@ namespace MWInput
|
|||
void InputManager::update(float dt, bool disableControls, bool disableEvents)
|
||||
{
|
||||
mInputWrapper->setMouseVisible(MWBase::Environment::get().getWindowManager()->getCursorVisible());
|
||||
|
||||
mInputWrapper->capture(disableEvents);
|
||||
|
||||
mKeyboardManager->setControlsDisabled(disableControls);
|
||||
if (disableControls)
|
||||
{
|
||||
updateCursorMode();
|
||||
|
@ -231,7 +231,6 @@ namespace MWInput
|
|||
updateCursorMode();
|
||||
|
||||
bool controllerMove = mControllerManager->update(dt, disableControls);
|
||||
mKeyboardManager->update(dt, disableControls);
|
||||
mMouseManager->update(dt, disableControls);
|
||||
mSensorManager->update(dt, mGuiCursorEnabled);
|
||||
mActionManager->update(dt, controllerMove);
|
||||
|
|
|
@ -27,11 +27,6 @@ namespace MWInput
|
|||
{
|
||||
}
|
||||
|
||||
void KeyboardManager::update(float dt, bool disableControls)
|
||||
{
|
||||
mControlsDisabled = disableControls;
|
||||
}
|
||||
|
||||
bool KeyboardManager::actionIsActive (int id)
|
||||
{
|
||||
return (mInputBinder->getChannel(id)->getValue ()==1.0);
|
||||
|
|
|
@ -25,12 +25,12 @@ namespace MWInput
|
|||
|
||||
virtual ~KeyboardManager() = default;
|
||||
|
||||
void update(float dt, bool disableControls);
|
||||
|
||||
virtual void textInput(const SDL_TextInputEvent &arg);
|
||||
virtual void keyPressed(const SDL_KeyboardEvent &arg);
|
||||
virtual void keyReleased(const SDL_KeyboardEvent &arg);
|
||||
|
||||
void setControlsDisabled(bool disabled) { mControlsDisabled = disabled; }
|
||||
|
||||
private:
|
||||
bool actionIsActive(int id);
|
||||
|
||||
|
|
Loading…
Reference in a new issue