Skip to content

Commit

Permalink
Menu focus fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kivutar committed Aug 23, 2021
1 parent fc33258 commit 189c56d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 3 additions & 1 deletion menu/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ func (m *Menu) Render(dt float32) {

m.stack[i].render()
}
m.stack[m.focus-1].drawHintBar()
if m.focus-1 < len(m.stack) {
m.stack[m.focus-1].drawHintBar()
}
}

// ContextReset uploads the UI images to the GPU.
Expand Down
9 changes: 4 additions & 5 deletions menu/scene_history.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ func loadHistoryEntry(list Scene, game history.Game) {
System: game.System,
CorePath: corePath,
})
list.segueNext()
menu.Push(buildQuickMenu())
menu.tweens.FastForward() // position the elements without animating
history.Load()
menu.WarpToQuickMenu()
state.MenuActive = false
} else {
list.segueNext()
menu.Push(buildQuickMenu())
menu.WarpToQuickMenu()
state.MenuActive = false
}
}
8 changes: 4 additions & 4 deletions menu/scene_playlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ func loadPlaylistEntry(list Scene, playlist string, game playlists.Game) {
System: playlist,
CorePath: corePath,
})
list.segueNext()
menu.Push(buildQuickMenu())
menu.tweens.FastForward() // position the elements without animating
history.Load()
menu.WarpToQuickMenu()
state.MenuActive = false
} else {
list.segueNext()
menu.Push(buildQuickMenu())
menu.WarpToQuickMenu()
state.MenuActive = false
}
}

0 comments on commit 189c56d

Please sign in to comment.