mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Prevented UI resets when toggling HUD
This commit is contained in:
parent
b5648f736d
commit
dd82fc24a8
@ -311,11 +311,6 @@ impl Hud {
|
||||
Err(_) => env!("CARGO_PKG_VERSION").to_owned(),
|
||||
};
|
||||
|
||||
// Don't show anything if the UI is toggled off.
|
||||
if !self.show.ui {
|
||||
return events;
|
||||
}
|
||||
|
||||
// Nametags and healthbars
|
||||
if self.show.ingame {
|
||||
let ecs = client.state().ecs();
|
||||
@ -819,7 +814,10 @@ impl Hud {
|
||||
}
|
||||
|
||||
pub fn render(&self, renderer: &mut Renderer, globals: &Consts<Globals>) {
|
||||
self.ui.render(renderer, Some(globals));
|
||||
// Don't show anything if the UI is toggled off.
|
||||
if self.show.ui {
|
||||
self.ui.render(renderer, Some(globals));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user