Documentation ¶
Overview ¶
Package mainmenu handles the Termacade main menu.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Options = []*Option{ { Game: arcade.FlowerJourney, Name: "Flower Journey", Func: func(ctx context.Context) (*router.PageInfo, error) { return &router.PageInfo{ Page: router.PageArcadeGame, Game: arcade.FlowerJourney, }, nil }, Neon: neonFJ, }, { Game: arcade.MiteKnight, Name: "Mite Knight", Func: func(ctx context.Context) (*router.PageInfo, error) { return &router.PageInfo{ Page: router.PageArcadeGame, Game: arcade.MiteKnight, }, nil }, Neon: neonMK, }, { Name: "Fortmite", Func: nil, Hidden: time.Now().Month() != time.April || time.Now().Day() != 1, }, { Name: "High Scores", Func: func(ctx context.Context) (*router.PageInfo, error) { return &router.PageInfo{ Page: router.PageArcadeHighScores, Game: arcade.FlowerJourney, HSMode: arcade.AllTime, }, nil }, Action: "Press " + sprites.Button(input.BtnConfirm) + " to view!", Neon: neonHS, }, { Name: "Settings", Func: func(context.Context) (*router.PageInfo, error) { return &router.PageInfo{ Page: router.PageStatic, Raw: "/settings.html", }, nil }, Action: "Press " + sprites.Button(input.BtnConfirm) + " to edit", Hidden: runtime.GOOS != "js", }, }
Options are the default Termacade main menu options.
Functions ¶
func RenderNeon ¶
RenderNeon draws a neon sign to the screen.
Types ¶
type MainMenu ¶
type MainMenu struct { Camera gfx.Camera CRT crt.CRT Selection int LastSelectionChange time.Time // contains filtered or unexported fields }
MainMenu is the Termacade main menu.
Click to show internal directories.
Click to hide internal directories.