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) error { return runGame(ctx, flowerjourney.New(arcade.DefaultFlowerJourneyRules)) }, Neon: neonFJ, }, { Game: arcade.MiteKnight, Name: "Mite Knight", Func: func(ctx context.Context) error { return runGame(ctx, miteknight.New(arcade.DefaultMiteKnightRules)) }, Neon: neonMK, }, { Name: "Fortmite", Func: nil, Hidden: time.Now().Month() != time.April || time.Now().Day() != 1, }, { Name: "High Scores", Func: func(ctx context.Context) error { var hs highscores.HighScores return hs.Run(ctx) }, Action: "Press " + sprites.Button(arcade.BtnConfirm) + " to view!", Neon: neonHS, }, { Name: "Settings", Func: func(ctx context.Context) error { settingsRedirect() return nil }, Action: "Press " + sprites.Button(arcade.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 { CRT crt.CRT Camera gfx.Camera 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.