From b80cc9387f733c83aed9ae4d561b7f12fd36a8fd Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 24 Apr 2024 20:02:51 +0200 Subject: [PATCH] fix selectagon hiding --- src/hud.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hud.rs b/src/hud.rs index 046d970..75f6c40 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -798,6 +798,8 @@ fn update_poi_overlays ( fn update_overlay_visibility( mut q_marker: Query<&mut Visibility, With>, mut q_hudelement: Query<&mut Visibility, (With, Without)>, + mut q_selectagon: Query<&mut Visibility, (With, Without, Without)>, + q_target: Query<&IsTargeted, (Without, Without, Without, Without)>, mut ambient_light: ResMut, er_target: EventReader, settings: Res, @@ -810,12 +812,16 @@ fn update_overlay_visibility( }; let show_poi = check(settings.hud_active && settings.map_active); let show_hud = check(settings.hud_active); + let show_selectagon = check(settings.hud_active && !q_target.is_empty()); for mut vis in &mut q_marker { *vis = show_poi; } for mut vis in &mut q_hudelement { *vis = show_hud; } + for mut vis in &mut q_selectagon { + *vis = show_selectagon; + } ambient_light.brightness = if settings.hud_active { AMBIENT_LIGHT_AR