Documentation ¶
Overview ¶
Package menu is the graphical interface allowing to browse games, launch games, configure settings, and display a contextual menu to interract with the running game.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Menu ¶
type Menu struct {
// contains filtered or unexported fields
}
Menu is a type holding the menu state, the stack of scenes, tweens, etc
func Init ¶
Init initializes the menu. If a game is already running, it will warp the user to the quick menu. If not, it will display the menu tabs.
func (*Menu) ContextReset ¶
func (m *Menu) ContextReset()
ContextReset uploads the UI images to the GPU. It should be called after each time the window is recreated.
func (*Menu) ProcessHotkeys ¶ added in v0.6.4
func (m *Menu) ProcessHotkeys()
ProcessHotkeys checks if certain keys are pressed and perform corresponding actions
func (*Menu) Push ¶ added in v0.6.2
Push will navigate to a new scene. It usually happen when the user presses OK on a menu entry.
func (*Menu) RenderNotifications ¶ added in v0.6.2
func (m *Menu) RenderNotifications()
RenderNotifications draws the list of notification messages on the viewport
func (*Menu) Update ¶ added in v0.6.2
Update takes care of calling the update method of the current scene. Each scene has it's own input logic to allow a variety of navigation systems.
func (*Menu) WarpToQuickMenu ¶
func (m *Menu) WarpToQuickMenu()
WarpToQuickMenu loads the contextual menu for games that are launched from the command line interface or from 'Load Game'.
type Scene ¶
type Scene interface { Entry() *entry // contains filtered or unexported methods }
Scene represents a page of the UI A scene is typically an entry displaying its own children A segue is a smooth transition between two scenes.
type Tweens ¶ added in v0.6.2
Tweens are the current animations of the menu components
func (Tweens) FastForward ¶ added in v0.6.2
func (ts Tweens) FastForward()
FastForward finishes all the current animations in the queue.