From 09de57f67fb475a04b76bdaab7b90167d3609b0c Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 12 Jan 2022 11:15:11 -0500 Subject: [PATCH] Add another set of keys for navigating diagonals --- src/player.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/player.rs b/src/player.rs index 77971d8..24f4117 100644 --- a/src/player.rs +++ b/src/player.rs @@ -339,21 +339,25 @@ pub fn player_input(gs: &mut State, ctx: &mut Rltk) -> RunState { // Diagonals VirtualKeyCode::Numpad7 + | VirtualKeyCode::Home | VirtualKeyCode::Key7 | VirtualKeyCode::U | VirtualKeyCode::Q => return try_move_player(-1, -1, &mut gs.ecs), VirtualKeyCode::Numpad9 + | VirtualKeyCode::PageUp | VirtualKeyCode::Key9 | VirtualKeyCode::Y | VirtualKeyCode::W => return try_move_player(1, -1, &mut gs.ecs), VirtualKeyCode::Numpad1 + | VirtualKeyCode::End | VirtualKeyCode::Key1 | VirtualKeyCode::B | VirtualKeyCode::A => return try_move_player(-1, 1, &mut gs.ecs), VirtualKeyCode::Numpad3 + | VirtualKeyCode::PageDown | VirtualKeyCode::Key3 | VirtualKeyCode::N | VirtualKeyCode::S => return try_move_player(1, 1, &mut gs.ecs),