summaryrefslogtreecommitdiff
path: root/client/src/window.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-10 22:04:34 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-10 22:04:34 +0100
commit2c8360de342872f65bdef037f3fb5d598b8f26a0 (patch)
treed98b670f73a4f799f1f2c459caec09166b9304e9 /client/src/window.rs
parentcb46b760ae8d4aeaa0e92a9c313927ffdef27873 (diff)
downloadweareserver-2c8360de342872f65bdef037f3fb5d598b8f26a0.tar
weareserver-2c8360de342872f65bdef037f3fb5d598b8f26a0.tar.bz2
weareserver-2c8360de342872f65bdef037f3fb5d598b8f26a0.tar.zst
unprojecting to ui surf is hard
Diffstat (limited to 'client/src/window.rs')
-rw-r--r--client/src/window.rs8
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;
}
}
_ => (),