Function pips

Source
pub fn pips(
    x: f32,
    cy: f32,
    current: u32,
    total: u32,
    color: Color,
    theme: &KitTheme,
) -> f32
Expand description

A row of progress pips centered on cy: pips before current (one-based) are filled, current is enlarged with a glow, later ones are hollow. Totals above 16 draw a compact meter instead. Returns the width.

use ferravex_render::{Color, ui::kit::{self, KitTheme}};
let w = kit::pips(20., 40., 3, 6, Color::from_hex(0x8fd16a), &KitTheme::default());
assert!(w > 50.);