Add tui.go
This commit is contained in:
parent
4665a1caa7
commit
9d11341a0c
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue