Update code for objects
This commit is contained in:
2
menu.go
2
menu.go
@@ -41,7 +41,6 @@ func NewMenu (anchor tomo.Object, items ...tomo.Object) (*Menu, error) {
|
||||
if !menu.torn {
|
||||
menu.tearLine = tomo.NewBox()
|
||||
menu.tearLine.SetRole(tomo.R("objects", "TearLine", ""))
|
||||
tomo.Apply(menu.tearLine)
|
||||
menu.tearLine.SetFocusable(true)
|
||||
menu.tearLine.OnKeyUp(func (key input.Key, numberPad bool) {
|
||||
if key != input.KeyEnter && key != input.Key(' ') { return }
|
||||
@@ -67,7 +66,6 @@ func NewMenu (anchor tomo.Object, items ...tomo.Object) (*Menu, error) {
|
||||
}
|
||||
}
|
||||
menu.rootContainer.SetRole(tomo.R("objects", "Container", "menu"))
|
||||
tomo.Apply(menu.rootContainer)
|
||||
|
||||
menu.Window.SetRoot(menu.rootContainer)
|
||||
return menu, nil
|
||||
|
||||
Reference in New Issue
Block a user