mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
Use mouse release instead of press for binding actions
Resolves difficulties binding actions to mouse buttons (Fixes #1364)
This commit is contained in:
parent
50a72ed710
commit
afc1fa49f6
1 changed files with 13 additions and 10 deletions
13
extern/oics/ICSInputControlSystem_mouse.cpp
vendored
13
extern/oics/ICSInputControlSystem_mouse.cpp
vendored
|
@ -333,17 +333,14 @@ namespace ICS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(mDetectingBindingListener)
|
|
||||||
{
|
|
||||||
mDetectingBindingListener->mouseButtonBindingDetected(this,
|
|
||||||
mDetectingBindingControl, btn, mDetectingBindingDirection);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputControlSystem::mouseReleased(const SDL_MouseButtonEvent &evt, Uint8 btn)
|
void InputControlSystem::mouseReleased(const SDL_MouseButtonEvent &evt, Uint8 btn)
|
||||||
{
|
{
|
||||||
if(mActive)
|
if(mActive)
|
||||||
|
{
|
||||||
|
if (!mDetectingBindingControl)
|
||||||
{
|
{
|
||||||
ControlsButtonBinderMapType::const_iterator it = mControlsMouseButtonBinderMap.find((int)btn);
|
ControlsButtonBinderMapType::const_iterator it = mControlsMouseButtonBinderMap.find((int)btn);
|
||||||
if(it != mControlsMouseButtonBinderMap.end())
|
if(it != mControlsMouseButtonBinderMap.end())
|
||||||
|
@ -351,6 +348,12 @@ namespace ICS
|
||||||
it->second.control->setChangingDirection(Control::STOP);
|
it->second.control->setChangingDirection(Control::STOP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(mDetectingBindingListener)
|
||||||
|
{
|
||||||
|
mDetectingBindingListener->mouseButtonBindingDetected(this,
|
||||||
|
mDetectingBindingControl, btn, mDetectingBindingDirection);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// mouse auto bindings
|
// mouse auto bindings
|
||||||
|
|
Loading…
Reference in a new issue