Fix controls disabling

pull/578/head
Andrei Kortunov 5 years ago
parent 2f2b3173e3
commit 0eb24da2e7

@ -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…
Cancel
Save