1
0
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:
Jordan Milne 2013-01-10 17:59:49 -04:00
parent ed644259ce
commit 601d79ef3f
2 changed files with 2 additions and 3 deletions

View File

@ -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);
} }

View File

@ -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