Documentation
¶
Overview ¶
Package ui is a drop-in Ebitengine overlay for the Mills Arcade leaderboard. A game calls StartRun when play begins, Begin(score) at game over, then routes Update/Draw to the overlay while Active. The overlay asks the player whether to submit (nothing is ever sent unless they say yes), takes three initials, does the proof-of-work spread across frames, and shows the resulting top ten.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Overlay ¶
type Overlay struct {
// contains filtered or unexported fields
}
Overlay is one game's leaderboard front-end. Zero value is not usable; call New.
func (*Overlay) Active ¶
Active reports whether the overlay wants input and drawing. While true the game must route Update/Draw here and ignore its own game-over keys.
func (*Overlay) Begin ¶
Begin shows the opt-in prompt for a finished run. A non-positive score is nothing worth boarding, so the overlay stays inactive.
func (*Overlay) Draw ¶
Draw renders the overlay onto dst (a no-op while inactive). The layout is derived from dst's size, so it adapts to every cabinet's resolution.