add displayitems override, padding updates to menu

This commit is contained in:
Bradley Cicenas
2017-01-09 15:02:34 +00:00
parent ee2b63d21d
commit 2e77e40044
6 changed files with 63 additions and 37 deletions

View File

@@ -29,6 +29,15 @@ func SortMenu() {
m.TextFgColor = ui.ColorWhite
m.BorderLabel = "Sort Field"
m.BorderFg = ui.ColorCyan
// set cursor position to current sort field
current := GlobalConfig["sortField"]
for n, field := range m.Items {
if field == current {
m.CursorPos = n
}
}
ui.Render(m)
m.NavigationHandlers()
ui.Handle("/sys/kbd/<enter>", func(ui.Event) {