Sander Schobers
11ab3fca0f
Added video settings. Added and improved reusable controls. Separated drawing of sprites. Fixed bug that text was right aligned instead of left aligned.
23 lines
405 B
Go
23 lines
405 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.playLevel("1") })
|
|
m.Add("Settings", func() { m.ctx.Navigation.changeSettings() })
|
|
m.Add("Quit", func() { m.ctx.Navigation.quit() })
|
|
return nil
|
|
}
|
|
|
|
func (m *mainMenu) Leave() {}
|