Add tui.go

This commit is contained in:
raul 2024-05-17 09:43:27 +02:00
parent 4665a1caa7
commit 9d11341a0c
1 changed files with 4 additions and 5 deletions

View File

@ -6,7 +6,7 @@ import (
"log"
)
func ui() {
func tui() {
g, err := gocui.NewGui(gocui.Output256)
if err != nil {
log.Panicln(err)
@ -120,10 +120,9 @@ func layout(g *gocui.Gui) error {
if _, err := g.SetCurrentView("songSelection"); err != nil {
log.Panicln(err)
}
for i := 0; i < 5; i++ {
songName := fmt.Sprintf("SongNumber%v", i)
fmt.Fprintln(songSelection, songName)
}
s := fmt.Sprintf("%v (%v)", songToPlay.Title, songToPlay.Path)
fmt.Fprintln(songSelection, s)
songSelection.Title = "Song selection:"
songSelection.Wrap = true