mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
fix the mouse wheel in mygui
This commit is contained in:
parent
ed644259ce
commit
601d79ef3f
@ -487,8 +487,7 @@ namespace MWInput
|
|||||||
mMouseX = std::max(0.f, std::min(mMouseX, float(viewSize.width)));
|
mMouseX = std::max(0.f, std::min(mMouseX, float(viewSize.width)));
|
||||||
mMouseY = std::max(0.f, std::min(mMouseY, float(viewSize.height)));
|
mMouseY = std::max(0.f, std::min(mMouseY, float(viewSize.height)));
|
||||||
|
|
||||||
//there's no such thing as an absolute z position, so let's keep track of it ourselves
|
mMouseWheel = int(arg.z);
|
||||||
mMouseWheel += arg.zrel;
|
|
||||||
|
|
||||||
MyGUI::InputManager::getInstance().injectMouseMove( int(mMouseX), int(mMouseY), mMouseWheel);
|
MyGUI::InputManager::getInstance().injectMouseMove( int(mMouseX), int(mMouseY), mMouseWheel);
|
||||||
}
|
}
|
||||||
|
2
extern/sdl4ogre/sdlinputwrapper.cpp
vendored
2
extern/sdl4ogre/sdlinputwrapper.cpp
vendored
@ -288,7 +288,7 @@ namespace SFO
|
|||||||
}
|
}
|
||||||
else if(evt.type == SDL_MOUSEWHEEL)
|
else if(evt.type == SDL_MOUSEWHEEL)
|
||||||
{
|
{
|
||||||
mMouseZ += pack_evt.zrel = evt.wheel.y;
|
mMouseZ += pack_evt.zrel = (evt.wheel.y * 120);
|
||||||
pack_evt.z = mMouseZ;
|
pack_evt.z = mMouseZ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user