23 lines
407 B
Go
23 lines
407 B
Go
package main
|
|
|
|
import (
|
|
"opslag.de/schobers/krampus19/alui"
|
|
)
|
|
|
|
type mainMenu struct {
|
|
alui.Menu
|
|
|
|
ctx *Context
|
|
}
|
|
|
|
func (m *mainMenu) Enter(ctx *Context) error {
|
|
m.ctx = ctx
|
|
m.Init()
|
|
m.Add("Play", func() { m.ctx.Navigation.SelectLevel("1") })
|
|
m.Add("Settings", func() { m.ctx.Navigation.ChangeSettings() })
|
|
m.Add("Quit", func() { m.ctx.Navigation.Quit() })
|
|
return nil
|
|
}
|
|
|
|
func (m *mainMenu) Leave() {}
|