mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Update help window to use player's keybindings (fix #42)
Former-commit-id: c79b4184b279b2e6fbaac8e0b7c641741d8eb51e
This commit is contained in:
parent
44f8e834fc
commit
e1fc901b5f
@ -11,6 +11,7 @@ pub struct Window {
|
||||
window: glutin::GlWindow,
|
||||
cursor_grabbed: bool,
|
||||
needs_refresh_resize: bool,
|
||||
settings_changed: bool,
|
||||
key_map: HashMap<glutin::VirtualKeyCode, Key>,
|
||||
supplement_events: Vec<Event>,
|
||||
}
|
||||
@ -60,6 +61,7 @@ impl Window {
|
||||
window,
|
||||
cursor_grabbed: false,
|
||||
needs_refresh_resize: false,
|
||||
settings_changed: true,
|
||||
key_map,
|
||||
supplement_events: vec![],
|
||||
});
|
||||
@ -82,6 +84,10 @@ impl Window {
|
||||
self.needs_refresh_resize = false;
|
||||
}
|
||||
|
||||
if self.settings_changed {
|
||||
events.push(Event::SettingsChanged);
|
||||
}
|
||||
|
||||
// Copy data that is needed by the events closure to avoid lifetime errors
|
||||
// TODO: Remove this if/when the compiler permits it
|
||||
let cursor_grabbed = self.cursor_grabbed;
|
||||
|
Loading…
Reference in New Issue
Block a user