Skip to main content

paint

Function paint 

Source
pub fn paint<G: GameData>(
    ctx: &Ctx<G>,
    view: &MenuView,
    buf: &mut GlyphBuffer,
    x: i32,
    y: i32,
)
Expand description

Paints view with its top-left corner at (x, y): a Panel box with a Border single line, items in Text, disabled ones in TextDim, and the focused one as a bar of panel text on Focus (on the border’s color for a disabled one: a menu that browses disabled items). Under the items, if any has a note: a border rule and the focused item’s note in text. A scrolled menu paints only the items it shows, with a ▲ in the top border if there are more above and a ▼ in the border under them if there are more below, in text. Labels are in the player’s language (Ctx::label).