restore clearText binding, don't display menu if its empty

This commit is contained in:
Eduardo Bart
2012-01-04 09:29:59 -02:00
parent 1c4bbfb7f3
commit 215d426b42
2 changed files with 7 additions and 0 deletions

View File

@@ -9,6 +9,12 @@ function UIPopupMenu.create()
end
function UIPopupMenu:display(pos)
-- don't display if not options was added
if self:getChildCount() == 0 then
self:destroy()
return
end
displayUI(self, {x = pos.x, y = pos.y})
self:bindRectToParent()
self:grabMouse()