mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 13:03:27 +02:00
improve combobox and menu design
This commit is contained in:
@@ -10,11 +10,6 @@ function UIPopupMenu.create()
|
||||
return menu
|
||||
end
|
||||
|
||||
function UIPopupMenu:destroy()
|
||||
table.removevalue(displayedMenuList, self)
|
||||
UIWidget.destroy(self)
|
||||
end
|
||||
|
||||
function UIPopupMenu:display(pos)
|
||||
-- don't display if not options was added
|
||||
if self:getChildCount() == 0 then
|
||||
@@ -45,6 +40,10 @@ function UIPopupMenu:addSeparator()
|
||||
createWidget(self:getStyleName() .. 'Separator', self)
|
||||
end
|
||||
|
||||
function UIPopupMenu:onDestroy()
|
||||
table.removevalue(displayedMenuList, self)
|
||||
end
|
||||
|
||||
function UIPopupMenu:onMousePress(mousePos, mouseButton)
|
||||
-- clicks outside self area destroys the self
|
||||
if not self:containsPoint(mousePos) then
|
||||
|
Reference in New Issue
Block a user