mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
restore clearText binding, don't display menu if its empty
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user