Add another set of keys for navigating diagonals

This commit is contained in:
Timothy Warren 2022-01-12 11:15:11 -05:00
parent d5c48247f3
commit 09de57f67f

View File

@ -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),