mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Merge pull request #3092 from akortunov/master
Do not trigger in-game bindings via mouse buttons when controls are disabled
This commit is contained in:
commit
373f8636b7
@ -126,6 +126,7 @@
|
|||||||
Bug #6016: Greeting interrupts Fargoth's sneak-walk
|
Bug #6016: Greeting interrupts Fargoth's sneak-walk
|
||||||
Bug #6028: Particle system controller values are incorrectly used
|
Bug #6028: Particle system controller values are incorrectly used
|
||||||
Bug #6043: Actor can have torch missing when torch animation is played
|
Bug #6043: Actor can have torch missing when torch animation is played
|
||||||
|
Bug #6047: Mouse bindings can be triggered during save loading
|
||||||
Feature #390: 3rd person look "over the shoulder"
|
Feature #390: 3rd person look "over the shoulder"
|
||||||
Feature #832: OpenMW-CS: Handle deleted references
|
Feature #832: OpenMW-CS: Handle deleted references
|
||||||
Feature #1536: Show more information about level on menu
|
Feature #1536: Show more information about level on menu
|
||||||
|
@ -144,7 +144,8 @@ namespace MWInput
|
|||||||
|
|
||||||
void MouseManager::mousePressed(const SDL_MouseButtonEvent &arg, Uint8 id)
|
void MouseManager::mousePressed(const SDL_MouseButtonEvent &arg, Uint8 id)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getInputManager()->setJoystickLastUsed(false);
|
MWBase::InputManager* input = MWBase::Environment::get().getInputManager();
|
||||||
|
input->setJoystickLastUsed(false);
|
||||||
bool guiMode = false;
|
bool guiMode = false;
|
||||||
|
|
||||||
if (id == SDL_BUTTON_LEFT || id == SDL_BUTTON_RIGHT) // MyGUI only uses these mouse events
|
if (id == SDL_BUTTON_LEFT || id == SDL_BUTTON_RIGHT) // MyGUI only uses these mouse events
|
||||||
@ -165,7 +166,8 @@ namespace MWInput
|
|||||||
mBindingsManager->setPlayerControlsEnabled(!guiMode);
|
mBindingsManager->setPlayerControlsEnabled(!guiMode);
|
||||||
|
|
||||||
// Don't trigger any mouse bindings while in settings menu, otherwise rebinding controls becomes impossible
|
// Don't trigger any mouse bindings while in settings menu, otherwise rebinding controls becomes impossible
|
||||||
if (MWBase::Environment::get().getWindowManager()->getMode() != MWGui::GM_Settings)
|
// Also do not trigger bindings when input controls are disabled, e.g. during save loading
|
||||||
|
if (MWBase::Environment::get().getWindowManager()->getMode() != MWGui::GM_Settings && !input->controlsDisabled())
|
||||||
mBindingsManager->mousePressed(arg, id);
|
mBindingsManager->mousePressed(arg, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user