Add tui.go
This commit is contained in:
parent
4665a1caa7
commit
9d11341a0c
|
@ -6,7 +6,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ui() {
|
func tui() {
|
||||||
g, err := gocui.NewGui(gocui.Output256)
|
g, err := gocui.NewGui(gocui.Output256)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panicln(err)
|
log.Panicln(err)
|
||||||
|
@ -120,10 +120,9 @@ func layout(g *gocui.Gui) error {
|
||||||
if _, err := g.SetCurrentView("songSelection"); err != nil {
|
if _, err := g.SetCurrentView("songSelection"); err != nil {
|
||||||
log.Panicln(err)
|
log.Panicln(err)
|
||||||
}
|
}
|
||||||
for i := 0; i < 5; i++ {
|
|
||||||
songName := fmt.Sprintf("SongNumber%v", i)
|
s := fmt.Sprintf("%v (%v)", songToPlay.Title, songToPlay.Path)
|
||||||
fmt.Fprintln(songSelection, songName)
|
fmt.Fprintln(songSelection, s)
|
||||||
}
|
|
||||||
songSelection.Title = "Song selection:"
|
songSelection.Title = "Song selection:"
|
||||||
songSelection.Wrap = true
|
songSelection.Wrap = true
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue