mirror of
https://github.com/edubart/otclient.git
synced 2025-05-07 04:49:21 +02:00
Fix trade/use bug from previous commit
This commit is contained in:
parent
5bf03c50d6
commit
da050a5630
@ -58,8 +58,8 @@ function UIPopupMenu:addOption(optionName, optionCallback, shortcut)
|
||||
local optionWidget = g_ui.createWidget(self:getStyleName() .. 'Button', self)
|
||||
local lastOptionWidget = self:getLastChild()
|
||||
optionWidget.onClick = function(self)
|
||||
optionCallback()
|
||||
self:getParent():destroy()
|
||||
optionCallback()
|
||||
end
|
||||
optionWidget:setText(optionName)
|
||||
local width = optionWidget:getTextSize().width + optionWidget:getMarginLeft() + optionWidget:getMarginRight() + 15
|
||||
@ -81,6 +81,7 @@ function UIPopupMenu:onDestroy()
|
||||
if currentMenu == self then
|
||||
currentMenu = nil
|
||||
end
|
||||
self:ungrabMouse()
|
||||
end
|
||||
|
||||
function UIPopupMenu:onMousePress(mousePos, mouseButton)
|
||||
|
Loading…
x
Reference in New Issue
Block a user