From 51ecf9530dae94341e2ba96453a4bf7e376ad33b Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Wed, 2 Sep 2026 00:05:29 -0700 Subject: character controller --- src/input.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/input.rs') diff --git a/src/input.rs b/src/input.rs index 30f3834..e795a61 100644 --- a/src/input.rs +++ b/src/input.rs @@ -14,6 +14,11 @@ pub enum Input { Down, Right, + CameraUp, + CameraLeft, + CameraDown, + CameraRight, + // sim management Pause, Step, @@ -34,13 +39,17 @@ pub enum Input { Action6, } -const INPUT_VAR_LEN: usize = 17; +const INPUT_VAR_LEN: usize = 21; const KEYMAP: [(KeyCode, Input); INPUT_VAR_LEN] = [ (KeyCode::KeyW, Input::Up), (KeyCode::KeyA, Input::Left), (KeyCode::KeyS, Input::Down), (KeyCode::KeyD, Input::Right), + (KeyCode::ArrowUp, Input::CameraUp), + (KeyCode::ArrowLeft, Input::CameraLeft), + (KeyCode::ArrowDown, Input::CameraDown), + (KeyCode::ArrowRight, Input::CameraRight), (KeyCode::Space, Input::Pause), (KeyCode::KeyX, Input::Step), (KeyCode::KeyC, Input::ClearGrid), -- cgit v1.3.1