minor bug fixes

This commit is contained in:
airstruck
2015-12-02 01:42:35 -05:00
parent 14b96f4cb5
commit a902385d55
10 changed files with 131 additions and 25 deletions

View File

@@ -123,6 +123,25 @@ local function registerLayoutEvents (self)
end
end)
menuLayout:onPress(function (event)
for widget in event.target:eachAncestor(true) do
if widget.type == 'menu.item' and #widget.items == 0 then
menuLayout:hide()
deactivateSiblings(self.rootMenu[1])
end
end
end)
menuLayout:onPressEnd(function (event)
for widget in event.target:eachAncestor(true) do
if widget.type == 'menu.item' and #widget.items == 0
and event.target ~= event.origin then
widget:bubbleEvent('Press', event)
end
end
end)
menuLayout:onEnter(activate)
menuLayout:onPressEnter(activate)
end