1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Merge pull request #619 from JakubK44/more_mouse_scroll_fixes

More mouse scrolling fixes
This commit is contained in:
Alexander Shishkin
2020-01-06 08:42:25 +03:00
committed by GitHub

View File

@@ -1455,7 +1455,8 @@ void CAdvMapInt::mouseMoved( const SDL_MouseMotionEvent & sEvent )
#endif #endif
// adventure map scrolling with mouse // adventure map scrolling with mouse
// currently disabled in world view mode (as it is in OH3), but should work correctly if mode check is removed // currently disabled in world view mode (as it is in OH3), but should work correctly if mode check is removed
if(!isCtrlKeyDown() && isActive() && mode == EAdvMapMode::NORMAL) // don't scroll if there is no window in focus - these events don't seem to correspond to the actual mouse movement
if(!isCtrlKeyDown() && isActive() && sEvent.windowID != 0 && mode == EAdvMapMode::NORMAL)
{ {
if(sEvent.x<15) if(sEvent.x<15)
{ {