mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Tweak settings change event handling in hud
Former-commit-id: 7b9a3163f2e85d202ef295cf6bd63de3ce753640
This commit is contained in:
parent
b6b42e1e3d
commit
9e9e8be196
@ -463,6 +463,10 @@ impl Hud {
|
||||
pub fn handle_event(&mut self, event: WinEvent, global_state: &mut GlobalState) -> bool {
|
||||
let cursor_grabbed = global_state.window.is_cursor_grabbed();
|
||||
let handled = match event {
|
||||
WinEvent::SettingsChanged => {
|
||||
self.settings = global_state.settings.clone();
|
||||
false
|
||||
}
|
||||
WinEvent::Ui(event) => {
|
||||
if (self.typing() && event.is_keyboard() && self.show.ui)
|
||||
|| !(cursor_grabbed && event.is_keyboard_or_mouse())
|
||||
@ -541,10 +545,6 @@ impl Hud {
|
||||
_ => self.typing(),
|
||||
},
|
||||
WinEvent::Char(_) => self.typing(),
|
||||
WinEvent::SettingsChanged => {
|
||||
self.settings = global_state.settings.clone();
|
||||
true
|
||||
}
|
||||
_ => false,
|
||||
};
|
||||
// Handle cursor grab.
|
||||
|
Loading…
Reference in New Issue
Block a user