mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-07 16:21:35 +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)
|
||||
{
|
||||
if(mActive)
|
||||
{
|
||||
if (!mDetectingBindingControl)
|
||||
{
|
||||
ControlsButtonBinderMapType::const_iterator it = mControlsMouseButtonBinderMap.find((int)btn);
|
||||
if(it != mControlsMouseButtonBinderMap.end())
|
||||
|
@ -351,6 +348,12 @@ namespace ICS
|
|||
it->second.control->setChangingDirection(Control::STOP);
|
||||
}
|
||||
}
|
||||
else if(mDetectingBindingListener)
|
||||
{
|
||||
mDetectingBindingListener->mouseButtonBindingDetected(this,
|
||||
mDetectingBindingControl, btn, mDetectingBindingDirection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// mouse auto bindings
|
||||
|
|
Loading…
Reference in a new issue