mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Fix scrolling in scroll containers (#14702)
This commit is contained in:
parent
75f3a2183f
commit
ec9c000be9
@ -331,7 +331,6 @@ struct SEvent
|
|||||||
|
|
||||||
//! A bitmap of button states. You can use isButtonPressed() to determine
|
//! A bitmap of button states. You can use isButtonPressed() to determine
|
||||||
//! if a button is pressed or not.
|
//! if a button is pressed or not.
|
||||||
//! Currently only valid if the event was EMIE_MOUSE_MOVED
|
|
||||||
u32 ButtonStates;
|
u32 ButtonStates;
|
||||||
|
|
||||||
//! Is the left button pressed down?
|
//! Is the left button pressed down?
|
||||||
|
@ -852,6 +852,7 @@ bool CIrrDeviceMacOSX::run()
|
|||||||
ievent.MouseInput.Wheel *= 10.0f;
|
ievent.MouseInput.Wheel *= 10.0f;
|
||||||
else
|
else
|
||||||
ievent.MouseInput.Wheel *= 5.0f;
|
ievent.MouseInput.Wheel *= 5.0f;
|
||||||
|
ievent.MouseInput.ButtonStates = MouseButtonStates;
|
||||||
postMouseEvent(event, ievent);
|
postMouseEvent(event, ievent);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1048,6 +1049,7 @@ void CIrrDeviceMacOSX::storeMouseLocation()
|
|||||||
ievent.MouseInput.Event = irr::EMIE_MOUSE_MOVED;
|
ievent.MouseInput.Event = irr::EMIE_MOUSE_MOVED;
|
||||||
ievent.MouseInput.X = x;
|
ievent.MouseInput.X = x;
|
||||||
ievent.MouseInput.Y = y;
|
ievent.MouseInput.Y = y;
|
||||||
|
ievent.MouseInput.ButtonStates = MouseButtonStates;
|
||||||
postEventFromUser(ievent);
|
postEventFromUser(ievent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -667,6 +667,7 @@ bool CIrrDeviceSDL::run()
|
|||||||
#else
|
#else
|
||||||
irrevent.MouseInput.Wheel = SDL_event.wheel.y;
|
irrevent.MouseInput.Wheel = SDL_event.wheel.y;
|
||||||
#endif
|
#endif
|
||||||
|
irrevent.MouseInput.ButtonStates = MouseButtonStates;
|
||||||
irrevent.MouseInput.Shift = (keymod & KMOD_SHIFT) != 0;
|
irrevent.MouseInput.Shift = (keymod & KMOD_SHIFT) != 0;
|
||||||
irrevent.MouseInput.Control = (keymod & KMOD_CTRL) != 0;
|
irrevent.MouseInput.Control = (keymod & KMOD_CTRL) != 0;
|
||||||
irrevent.MouseInput.X = MouseX;
|
irrevent.MouseInput.X = MouseX;
|
||||||
|
Loading…
Reference in New Issue
Block a user