diff options
Diffstat (limited to 'client/src/window.rs')
-rw-r--r-- | client/src/window.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/src/window.rs b/client/src/window.rs index 107be34..68ca25b 100644 --- a/client/src/window.rs +++ b/client/src/window.rs @@ -85,7 +85,7 @@ impl ApplicationHandler for WindowState { _ => (), } } - sta.delta.move_dir += match event.physical_key { + sta.input_state.move_dir += match event.physical_key { PhysicalKey::Code(KeyCode::KeyW) => Vec3::X, PhysicalKey::Code(KeyCode::KeyS) => Vec3::NEG_X, PhysicalKey::Code(KeyCode::KeyA) => Vec3::NEG_Z, @@ -100,7 +100,7 @@ impl ApplicationHandler for WindowState { sta.click(button, state.is_pressed()); } WindowEvent::CursorMoved { position, .. } => { - sta.delta.cursor_pos = vec2(position.x as f32, position.y as f32); + sta.input_state.cursor_pos = vec2(position.x as f32, position.y as f32); } WindowEvent::CloseRequested => { event_loop.exit(); @@ -119,8 +119,8 @@ impl ApplicationHandler for WindowState { match event { DeviceEvent::MouseMotion { delta } => { if self.lock { - sta.delta.mouse_acc.x += delta.0 as f32; - sta.delta.mouse_acc.y += delta.1 as f32; + sta.input_state.mouse_acc.x += delta.0 as f32; + sta.input_state.mouse_acc.y += delta.1 as f32; } } _ => (), |