mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add shortcut to toggle chat
This commit is contained in:
parent
db559176e9
commit
18b5c1c35a
@ -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
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
|
@ -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")]
|
||||
|
@ -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
|
||||
|
@ -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),
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user