Fixed bug in main menu.
This commit is contained in:
parent
157ec6d42d
commit
6404364b8b
@ -41,6 +41,7 @@ func newMainMenu(app *appContext, ctx ui.Context) ui.Control {
|
||||
menu.Add("Quit", func(ctx ui.Context) { ctx.Quit() })
|
||||
|
||||
menu.Activate(1) // play
|
||||
ctx.Animate()
|
||||
|
||||
return Center(&mainMenu{
|
||||
StackPanel: ui.StackPanel{
|
||||
|
@ -25,7 +25,7 @@ func (m *Menu) Activate(i int) {
|
||||
if len(m.buttons) == 0 || i < 0 {
|
||||
return
|
||||
}
|
||||
m.active = i % len(m.buttons)
|
||||
m.updateActiveButton(i % len(m.buttons))
|
||||
}
|
||||
|
||||
func (m *Menu) Add(text string, click func(ui.Context)) {
|
||||
|
Loading…
Reference in New Issue
Block a user