diff options
author | metamuffin <metamuffin@disroot.org> | 2025-01-07 15:33:42 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-01-07 15:33:42 +0100 |
commit | 9af9fc6e9981fbb582fad9f69ad6bb0d96856b5e (patch) | |
tree | 7321528247a9f56776faff9de4c9c8fd97a1e531 /client | |
parent | 4065dbe5b73839d4d3ed45a30bcc466ea414f3b5 (diff) | |
download | weareserver-9af9fc6e9981fbb582fad9f69ad6bb0d96856b5e.tar weareserver-9af9fc6e9981fbb582fad9f69ad6bb0d96856b5e.tar.bz2 weareserver-9af9fc6e9981fbb582fad9f69ad6bb0d96856b5e.tar.zst |
remove pbr prefix
Diffstat (limited to 'client')
-rw-r--r-- | client/src/scene_prepare.rs | 2 | ||||
-rw-r--r-- | client/src/window.rs | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/client/src/scene_prepare.rs b/client/src/scene_prepare.rs index fcc7932..6d50035 100644 --- a/client/src/scene_prepare.rs +++ b/client/src/scene_prepare.rs @@ -222,7 +222,7 @@ impl ScenePreparer { } } let mut texture = None; - if let Some(albedores) = part.tex_pbr_albedo { + if let Some(albedores) = part.tex_albedo { if let Some((_tex, bg)) = self.textures.try_get(albedores) { texture = Some(bg) } diff --git a/client/src/window.rs b/client/src/window.rs index ac90f71..8b3ee9e 100644 --- a/client/src/window.rs +++ b/client/src/window.rs @@ -7,7 +7,7 @@ use winit::{ event::{DeviceEvent, ElementState, WindowEvent}, event_loop::ActiveEventLoop, keyboard::{KeyCode, PhysicalKey}, - window::{Window, WindowAttributes, WindowId}, + window::{CursorGrabMode, Window, WindowAttributes, WindowId}, }; pub struct WindowState { @@ -53,6 +53,14 @@ impl ApplicationHandler for WindowState { if event.repeat { return; } + if event.state == ElementState::Pressed { + match event.physical_key { + PhysicalKey::Code(KeyCode::Escape) => { + win.set_cursor_grab(CursorGrabMode::Locked).unwrap(); + } + _ => (), + } + } sta.delta.move_dir += match event.physical_key { PhysicalKey::Code(KeyCode::KeyW) => Vec3::X, PhysicalKey::Code(KeyCode::KeyS) => Vec3::NEG_X, |