From d64a5fc4f8deb3477d81d7402879888f6231b433 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Wed, 1 May 2019 16:51:25 +0100 Subject: [PATCH] Added jump button Former-commit-id: 614614fbe0a8cfc29d28010084078d4441734307 --- voxygen/src/settings.rs | 2 ++ voxygen/src/window.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/voxygen/src/settings.rs b/voxygen/src/settings.rs index e911498c76..5a22ee9936 100644 --- a/voxygen/src/settings.rs +++ b/voxygen/src/settings.rs @@ -24,6 +24,7 @@ pub struct ControlSettings { pub move_left: VirtualKeyCode, pub move_back: VirtualKeyCode, pub move_right: VirtualKeyCode, + pub jump: VirtualKeyCode, pub map: VirtualKeyCode, pub bag: VirtualKeyCode, pub quest_log: VirtualKeyCode, @@ -58,6 +59,7 @@ impl Default for Settings { move_left: VirtualKeyCode::A, move_back: VirtualKeyCode::S, move_right: VirtualKeyCode::D, + jump: VirtualKeyCode::Space, map: VirtualKeyCode::M, bag: VirtualKeyCode::B, quest_log: VirtualKeyCode::L, diff --git a/voxygen/src/window.rs b/voxygen/src/window.rs index 824b679d0b..ad33f2d9ce 100644 --- a/voxygen/src/window.rs +++ b/voxygen/src/window.rs @@ -45,6 +45,7 @@ impl Window { key_map.insert(settings.controls.move_left, Key::MoveLeft); key_map.insert(settings.controls.move_back, Key::MoveBack); key_map.insert(settings.controls.move_right, Key::MoveRight); + key_map.insert(settings.controls.jump, Key::Jump); key_map.insert(settings.controls.map, Key::Map); key_map.insert(settings.controls.bag, Key::Bag); key_map.insert(settings.controls.quest_log, Key::QuestLog); @@ -180,6 +181,7 @@ pub enum Key { MoveBack, MoveLeft, MoveRight, + Jump, Enter, Escape, Map,