go fmt sources & add command-line file loading

This commit is contained in:
Luke I. Wilson
2021-03-11 14:11:43 -06:00
parent d0bb43cc8f
commit 443070f077
8 changed files with 46 additions and 27 deletions

View File

@ -178,8 +178,8 @@ func (b *MenuBar) HandleEvent(event tcell.Event) bool {
// A Menu contains one or more ItemEntry or ItemMenus.
type Menu struct {
Name string
Items []Item
Name string
Items []Item
x, y int
width, height int // Size may not be settable
@ -205,7 +205,7 @@ func NewMenu(name string, theme *Theme, items []Item) Menu {
func (m *Menu) Draw(s tcell.Screen) {
defaultStyle := m.Theme.GetOrDefault("Menu")
m.GetSize() // Call this to update internal width and height
m.GetSize() // Call this to update internal width and height
DrawRect(s, m.x, m.y, m.width, m.height, ' ', defaultStyle) // Fill background
DrawRectOutlineDefault(s, m.x, m.y, m.width, m.height, defaultStyle) // Draw outline