Skip to main content

Module toast

Module toast 

Source
Expand description

Achievement-unlock toast overlay.

Rendered over the biscuit area so it’s prominent without disturbing the right-side panel. The sim populates state.active_unlock_id / active_unlock_ticks from the queue in state.newly_unlocked; this module just translates that into a brief gold-bordered popup.

Lives ~4s on screen (TOAST_TICKS). The whole box (bg, border, header, body) shares a single strength curve so it fades in and out as one object — never the empty box first or the text alone after.

Functions§

draw
Draw the toast over area if one is active. No-op when nothing’s queued.