Function toast_icon

Source
pub fn toast_icon(
    center_x: f32,
    top: f32,
    icon: Icon,
    text: &str,
    tone: Tone,
    look: Appearance,
    theme: &KitTheme,
) -> Rect
Expand description

toast led by a pictogram in the tone’s color instead of a font glyph.

use ferravex_play::tween::Appearance;
use ferravex_render::{icons::Icon, ui::kit::{self, KitTheme, Tone}};
let theme = KitTheme::default();
let r = kit::toast_icon(320., 40., Icon::Trophy, "Course record", Tone::Success,
    Appearance::SHOWN, &theme);
assert!(r.w > 100.);