diff --git a/src/hud.rs b/src/hud.rs index 367c63a..2625935 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -318,10 +318,20 @@ fn update_hud( //text.sections[11].value = format!("{adrenaline:.0}pg/mL"); let vitals = 100.0 * hp.current / hp.max; text.sections[13].value = format!("{vitals:.0}%"); + if vitals < 50.0 { + text.sections[13].style.color = Color::MAROON; + } else { + text.sections[13].style.color = Color::GRAY; + } let all_actors = query_all_actors.iter().len(); text.sections[9].value = format!("{all_actors:.0}"); let integrity = suit.integrity * 100.0; text.sections[11].value = format!("{integrity:.0}%"); + if integrity < 50.0 { + text.sections[11].style.color = Color::MAROON; + } else { + text.sections[11].style.color = Color::GRAY; + } //text.sections[17].value = format!("{speed_readable}/s / {kmh:.0}km/h / {gforce:.1}g"); // Target display