Added jump button

Former-commit-id: 614614fbe0a8cfc29d28010084078d4441734307
This commit is contained in:
Joshua Barretto 2019-05-01 16:51:25 +01:00
parent 9ebe3c3e6f
commit 5aa8a67800
2 changed files with 4 additions and 0 deletions

View File

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

View File

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