cleanup
This commit is contained in:
parent
44ec500ce7
commit
99fd2ec750
10
src/hud.rs
10
src/hud.rs
|
@ -423,17 +423,17 @@ fn update(
|
|||
fn handle_input(
|
||||
keyboard_input: Res<ButtonInput<KeyCode>>,
|
||||
mut settings: ResMut<settings::Settings>,
|
||||
mut query: Query<&mut Visibility, With<GaugesText>>,
|
||||
mut query_bloomsettings: Query<&mut BloomSettings>,
|
||||
mut q_gauges: Query<&mut Visibility, With<GaugesText>>,
|
||||
mut q_bloomsettings: Query<&mut BloomSettings>,
|
||||
q_choices: Query<&ChoiceAvailable>,
|
||||
mut evwriter_sendmsg: EventWriter<actor::SendMessageEvent>,
|
||||
mut evwriter_sfx: EventWriter<audio::PlaySfxEvent>,
|
||||
mut evwriter_togglemusic: EventWriter<audio::ToggleMusicEvent>,
|
||||
q_choices: Query<&ChoiceAvailable>,
|
||||
mut ambient_light: ResMut<AmbientLight>,
|
||||
) {
|
||||
if keyboard_input.just_pressed(settings.key_togglehud) {
|
||||
if let Ok(mut vis) = query.get_single_mut() {
|
||||
if let Ok(mut bloomsettings) = query_bloomsettings.get_single_mut() {
|
||||
if let Ok(mut vis) = q_gauges.get_single_mut() {
|
||||
if let Ok(mut bloomsettings) = q_bloomsettings.get_single_mut() {
|
||||
if *vis == Visibility::Inherited {
|
||||
*vis = Visibility::Hidden;
|
||||
settings.hud_active = false;
|
||||
|
|
Loading…
Reference in a new issue