diff --git a/CHANGELOG.md b/CHANGELOG.md index 112dded82a..5b1a7d7ca5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - AI for sceptre wielders and sceptre cultists in Tier 5 dungeons - HUD debug info now displays current biome and site - Quotes and escape codes can be used in command arguments +- Toggle chat with a shortcut (default is F5) ### Changed diff --git a/assets/voxygen/i18n/en/gameinput.ron b/assets/voxygen/i18n/en/gameinput.ron index 1d12d9feb7..ab2605acb3 100644 --- a/assets/voxygen/i18n/en/gameinput.ron +++ b/assets/voxygen/i18n/en/gameinput.ron @@ -21,6 +21,7 @@ "gameinput.help": "Toggle Help Window", "gameinput.toggleinterface": "Toggle Interface", "gameinput.toggledebug": "Toggle FPS and Debug Info", + "gameinput.togglechat": "Toggle Chat", "gameinput.screenshot": "Take Screenshot", "gameinput.toggleingameui": "Toggle Nametags", "gameinput.fullscreen": "Toggle Fullscreen", diff --git a/voxygen/src/controller.rs b/voxygen/src/controller.rs index f05b038d04..b9eec9aa82 100644 --- a/voxygen/src/controller.rs +++ b/voxygen/src/controller.rs @@ -150,6 +150,9 @@ impl From<&crate::settings::GamepadSettings> for ControllerSettings { map.entry(settings.game_buttons.toggle_debug) .or_default() .push(GameInput::ToggleDebug); + map.entry(settings.game_buttons.toggle_chat) + .or_default() + .push(GameInput::ToggleChat); map.entry(settings.game_buttons.fullscreen) .or_default() .push(GameInput::Fullscreen); diff --git a/voxygen/src/game_input.rs b/voxygen/src/game_input.rs index ca89d2c15a..db75015f1b 100644 --- a/voxygen/src/game_input.rs +++ b/voxygen/src/game_input.rs @@ -106,6 +106,8 @@ pub enum GameInput { Help, #[strum(serialize = "gameinput.toggledebug")] ToggleDebug, + #[strum(serialize = "gameinput.togglechat")] + ToggleChat, #[strum(serialize = "gameinput.fullscreen")] Fullscreen, #[strum(serialize = "gameinput.screenshot")] diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index dcca1d7170..66cf68cf19 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -3573,6 +3573,11 @@ impl Hud { self.show.debug = global_state.settings.interface.toggle_debug; true }, + GameInput::ToggleChat if state => { + global_state.settings.interface.toggle_chat = + !global_state.settings.interface.toggle_chat; + true + }, GameInput::ToggleIngameUi if state => { self.show.ingame = !self.show.ingame; true diff --git a/voxygen/src/settings/control.rs b/voxygen/src/settings/control.rs index 7e04983de5..213a82f1f3 100644 --- a/voxygen/src/settings/control.rs +++ b/voxygen/src/settings/control.rs @@ -144,6 +144,7 @@ impl ControlSettings { GameInput::Help => KeyMouse::Key(VirtualKeyCode::F1), GameInput::ToggleInterface => KeyMouse::Key(VirtualKeyCode::F2), GameInput::ToggleDebug => KeyMouse::Key(VirtualKeyCode::F3), + GameInput::ToggleChat => KeyMouse::Key(VirtualKeyCode::F5), GameInput::Fullscreen => KeyMouse::Key(VirtualKeyCode::F11), GameInput::Screenshot => KeyMouse::Key(VirtualKeyCode::F4), GameInput::ToggleIngameUi => KeyMouse::Key(VirtualKeyCode::F6), diff --git a/voxygen/src/settings/gamepad.rs b/voxygen/src/settings/gamepad.rs index c45daebecb..1fe8b25739 100644 --- a/voxygen/src/settings/gamepad.rs +++ b/voxygen/src/settings/gamepad.rs @@ -77,6 +77,7 @@ pub mod con_settings { pub help: Button, pub toggle_interface: Button, pub toggle_debug: Button, + pub toggle_chat: Button, pub fullscreen: Button, pub screenshot: Button, pub toggle_ingame_ui: Button, @@ -167,6 +168,7 @@ pub mod con_settings { help: Button::Simple(GilButton::Unknown), toggle_interface: Button::Simple(GilButton::Unknown), toggle_debug: Button::Simple(GilButton::Unknown), + toggle_chat: Button::Simple(GilButton::Unknown), fullscreen: Button::Simple(GilButton::Unknown), screenshot: Button::Simple(GilButton::Unknown), toggle_ingame_ui: Button::Simple(GilButton::Unknown),