From 3131c178d6afca6ff4b82105bc4ae2dd9eafb98c Mon Sep 17 00:00:00 2001 From: flo Date: Mon, 23 Aug 2021 10:38:35 +0000 Subject: [PATCH] Making Block and Slots1-9 available for gamepad mapping --- voxygen/src/controller.rs | 30 ++++++++++++++++++++++++++++++ voxygen/src/settings/gamepad.rs | 20 ++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/voxygen/src/controller.rs b/voxygen/src/controller.rs index b64860e9e0..9f6fb4938a 100644 --- a/voxygen/src/controller.rs +++ b/voxygen/src/controller.rs @@ -66,6 +66,36 @@ impl From<&crate::settings::GamepadSettings> for ControllerSettings { map.entry(settings.game_buttons.secondary) .or_default() .push(GameInput::Secondary); + map.entry(settings.game_buttons.block) + .or_default() + .push(GameInput::Block); + map.entry(settings.game_buttons.slot1) + .or_default() + .push(GameInput::Slot1); + map.entry(settings.game_buttons.slot2) + .or_default() + .push(GameInput::Slot2); + map.entry(settings.game_buttons.slot3) + .or_default() + .push(GameInput::Slot3); + map.entry(settings.game_buttons.slot4) + .or_default() + .push(GameInput::Slot4); + map.entry(settings.game_buttons.slot5) + .or_default() + .push(GameInput::Slot5); + map.entry(settings.game_buttons.slot6) + .or_default() + .push(GameInput::Slot6); + map.entry(settings.game_buttons.slot7) + .or_default() + .push(GameInput::Slot7); + map.entry(settings.game_buttons.slot8) + .or_default() + .push(GameInput::Slot8); + map.entry(settings.game_buttons.slot9) + .or_default() + .push(GameInput::Slot9); map.entry(settings.game_buttons.toggle_cursor) .or_default() .push(GameInput::ToggleCursor); diff --git a/voxygen/src/settings/gamepad.rs b/voxygen/src/settings/gamepad.rs index 4cc7d0e78d..53313cc047 100644 --- a/voxygen/src/settings/gamepad.rs +++ b/voxygen/src/settings/gamepad.rs @@ -47,6 +47,16 @@ pub mod con_settings { pub struct GameButtons { pub primary: Button, pub secondary: Button, + pub block: Button, + pub slot1: Button, + pub slot2: Button, + pub slot3: Button, + pub slot4: Button, + pub slot5: Button, + pub slot6: Button, + pub slot7: Button, + pub slot8: Button, + pub slot9: Button, pub toggle_cursor: Button, pub escape: Button, pub enter: Button, @@ -140,6 +150,16 @@ pub mod con_settings { Self { primary: Button::Simple(GilButton::RightTrigger2), secondary: Button::Simple(GilButton::LeftTrigger2), + block: Button::Simple(GilButton::Unknown), + slot1: Button::Simple(GilButton::Unknown), + slot2: Button::Simple(GilButton::Unknown), + slot3: Button::Simple(GilButton::Unknown), + slot4: Button::Simple(GilButton::Unknown), + slot5: Button::Simple(GilButton::Unknown), + slot6: Button::Simple(GilButton::Unknown), + slot7: Button::Simple(GilButton::Unknown), + slot8: Button::Simple(GilButton::Unknown), + slot9: Button::Simple(GilButton::Unknown), toggle_cursor: Button::Simple(GilButton::Unknown), escape: Button::Simple(GilButton::Start), enter: Button::Simple(GilButton::Unknown),