improve menus

This commit is contained in:
David 2021-07-28 21:50:09 -04:00
parent 2ea148bec3
commit 4ec1a85139

View File

@ -111,7 +111,7 @@ func main() {
l := ui.NewList(Titles(state.Get("library").([]book.Book)), 0) l := ui.NewList(Titles(state.Get("library").([]book.Book)), 0)
menu := ui.NewBox( menu := ui.NewBox(
"library", "library",
[]string{"(n)ew", "(i)mport", "(q)uit"}, []string{"˄˅ select", "⏎ edit", "(n)ew", "(i)mport", "(q)uit"},
ui.Contents{{ ui.Contents{{
Offsets: ui.Offsets{Top: 1, Left: 2, Bottom: -2, Right: -2}, Offsets: ui.Offsets{Top: 1, Left: 2, Bottom: -2, Right: -2},
Container: l, Container: l,
@ -126,7 +126,7 @@ func main() {
// book display (right column) // book display (right column)
activeBook := ui.NewBox( activeBook := ui.NewBox(
"book", "book",
nil, []string{"˄˅ select", "⏎ edit", "(esc) close"},
ui.Contents{{ ui.Contents{{
Offsets: ui.Offsets{Top: 1, Left: 2, Bottom: 0, Right: 0}, Offsets: ui.Offsets{Top: 1, Left: 2, Bottom: 0, Right: 0},
Container: book, Container: book,
@ -145,7 +145,7 @@ func main() {
) )
// import pop-up // import pop-up
popup := ui.NewBox("import", nil, nil, ui.StyleActive, false) popup := ui.NewBox("import", []string{"⏎ submit", "(esc)close"}, nil, ui.StyleActive, false)
popup.SetVisible(false) popup.SetVisible(false)
// init // init