mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 12:04:55 +02:00
improvment in connect
This commit is contained in:
@@ -44,7 +44,7 @@ function ToolTip.init()
|
||||
toolTipLabel = createWidget('Label', rootWidget)
|
||||
toolTipLabel:setId('toolTip')
|
||||
toolTipLabel:setBackgroundColor('#111111bb')
|
||||
connect(toolTipLabel, { onMouseMove = moveToolTip })
|
||||
toolTipLabel.onMouseMove = moveToolTip
|
||||
|
||||
connect(UIWidget, { onStyleApply = onWidgetStyleApply,
|
||||
onHoverChange = onWidgetHoverChange})
|
||||
|
@@ -30,9 +30,9 @@ end
|
||||
function UIPopupMenu:addOption(optionName, optionCallback)
|
||||
local optionWidget = createWidget(self:getStyleName() .. 'Button', self)
|
||||
local lastOptionWidget = self:getLastChild()
|
||||
optionWidget.onClick = function()
|
||||
optionWidget.onClick = function(self)
|
||||
optionCallback()
|
||||
self:destroy()
|
||||
self:getParent():destroy()
|
||||
end
|
||||
optionWidget:setText(optionName)
|
||||
local width = optionWidget:getTextSize().width + optionWidget:getMarginLeft() + optionWidget:getMarginRight() + 6
|
||||
|
Reference in New Issue
Block a user