From 8fd30ea55b8df78fb4adf85df8a64c3f0fc4b47c Mon Sep 17 00:00:00 2001 From: JimmyDdotEXE Date: Thu, 15 Jun 2023 22:37:58 -0400 Subject: [PATCH 1/4] left and right bumpers as layer buttons on controller --- voxygen/src/controller.rs | 169 ++++++++++++++++++- voxygen/src/settings/gamepad.rs | 283 +++++++++++++++++++++++++++++--- voxygen/src/window.rs | 31 +++- 3 files changed, 458 insertions(+), 25 deletions(-) diff --git a/voxygen/src/controller.rs b/voxygen/src/controller.rs index 2d48fb57a0..8ddc4ce9f2 100644 --- a/voxygen/src/controller.rs +++ b/voxygen/src/controller.rs @@ -1,7 +1,7 @@ //! Module containing controller-specific abstractions allowing complex //! keybindings -use crate::{game_input::GameInput, window::MenuInput}; +use crate::{game_input::GameInput, window::MenuInput, settings::gamepad::con_settings::LayerEntry}; use gilrs::{ev::Code as GilCode, Axis as GilAxis, Button as GilButton}; use hashbrown::HashMap; use serde::{Deserialize, Serialize}; @@ -16,6 +16,8 @@ pub struct ControllerSettings { pub menu_analog_button_map: HashMap>, pub game_axis_map: HashMap>, pub menu_axis_map: HashMap>, + pub layer_button_map: HashMap>, + pub modifier_buttons: Vec