Same as last commit but for TearLine

This commit is contained in:
Sasha Koshka 2024-08-24 14:42:08 -04:00
parent 8432cc70da
commit 02516bdcce

View File

@ -91,6 +91,12 @@ func (this *Menu) newTearLine () tomo.Object {
tearLine := tomo.NewBox()
tearLine.SetRole(tomo.R("objects", "TearLine"))
tearLine.SetFocusable(true)
tearLine.OnMouseEnter(func () {
tearLine.SetFocused(true)
})
tearLine.OnMouseLeave(func () {
tearLine.SetFocused(false)
})
tearLine.OnKeyDown(func (key input.Key, numberPad bool) bool {
if !isClickingKey(key) { return false }
return true