krampus19/cmd/krampus19/mainmenu.go
Sander Schobers 11ab3fca0f Added settings in-game.
Added video settings.
Added and improved reusable controls.
Separated drawing of sprites.
Fixed bug that text was right aligned instead of left aligned.
2019-12-28 16:03:57 +01:00

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() {}