Function button

Source
pub fn button(
    rect: Rect,
    label: &str,
    kind: ButtonKind,
    motion: &ButtonMotion,
    theme: &KitTheme,
)
Expand description

Paints a button: rounded fill that brightens on hover, sinks and darkens on press, and an eased focus ring outside the edge. Disabled buttons are flat and muted. The label is centered in the modern face.

use ferravex_render::{Rect, ui::kit::{self, ButtonKind, ButtonMotion, KitTheme}};
kit::button(Rect::new(20., 20., 160., 40.), "New game", ButtonKind::Primary,
    &ButtonMotion::default(), &KitTheme::default());