Same as last commit but for TearLine
This commit is contained in:
parent
8432cc70da
commit
02516bdcce
6
menu.go
6
menu.go
@ -91,6 +91,12 @@ func (this *Menu) newTearLine () tomo.Object {
|
|||||||
tearLine := tomo.NewBox()
|
tearLine := tomo.NewBox()
|
||||||
tearLine.SetRole(tomo.R("objects", "TearLine"))
|
tearLine.SetRole(tomo.R("objects", "TearLine"))
|
||||||
tearLine.SetFocusable(true)
|
tearLine.SetFocusable(true)
|
||||||
|
tearLine.OnMouseEnter(func () {
|
||||||
|
tearLine.SetFocused(true)
|
||||||
|
})
|
||||||
|
tearLine.OnMouseLeave(func () {
|
||||||
|
tearLine.SetFocused(false)
|
||||||
|
})
|
||||||
tearLine.OnKeyDown(func (key input.Key, numberPad bool) bool {
|
tearLine.OnKeyDown(func (key input.Key, numberPad bool) bool {
|
||||||
if !isClickingKey(key) { return false }
|
if !isClickingKey(key) { return false }
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user