mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Restore fix for dragging on windows platforms
This commit is contained in:
parent
c0a8422a43
commit
a545d099a2
@ -2628,6 +2628,9 @@ impl Hud {
|
||||
WinEvent::Moved(_) => {
|
||||
// Prevent the cursor from being grabbed while the window is being moved as this
|
||||
// causes the window to move erratically
|
||||
// TODO: this creates an issue where if you move the window then you need to
|
||||
// close a menu to re-grab the mouse (and if one isn't already
|
||||
// open you need to open and close a menu)
|
||||
self.show.want_grab = false;
|
||||
true
|
||||
},
|
||||
|
@ -941,6 +941,10 @@ impl Window {
|
||||
self.scale_factor = scale_factor;
|
||||
self.events.push(Event::ScaleFactorChanged(scale_factor));
|
||||
},
|
||||
WindowEvent::Moved(winit::dpi::PhysicalPosition { x, y }) => {
|
||||
self.events
|
||||
.push(Event::Moved(Vec2::new(x as u32, y as u32)));
|
||||
},
|
||||
WindowEvent::ReceivedCharacter(c) => self.events.push(Event::Char(c)),
|
||||
WindowEvent::MouseInput { button, state, .. } => {
|
||||
if let (true, Some(game_inputs)) =
|
||||
|
Loading…
Reference in New Issue
Block a user