pub fn meter(
rect: Rect,
value: f32,
ghost: Option<f32>,
color: Color,
theme: &KitTheme,
)Expand description
Horizontal meter (health, XP, loading): an inset rounded track, a gradient
fill with a top highlight and an optional lighter ghost value trailing
behind (show the pre-damage value and tween it down for a “chip” effect).
Values are clamped to [0, 1].
use ferravex_render::{Rect, ui::kit::{self, KitTheme}};
let theme = KitTheme::default();
kit::meter(Rect::new(20., 20., 180., 12.), 0.4, Some(0.65), theme.danger, &theme);