mirror of
https://github.com/edubart/otclient.git
synced 2025-06-16 15:24:29 +02:00
Merge pull request #1038 from diath/fix_tooltip_move
Fix tooltip position updating
This commit is contained in:
commit
caae18dbce
@ -62,7 +62,6 @@ function g_tooltip.init()
|
|||||||
toolTipLabel:setBackgroundColor('#111111cc')
|
toolTipLabel:setBackgroundColor('#111111cc')
|
||||||
toolTipLabel:setTextAlign(AlignCenter)
|
toolTipLabel:setTextAlign(AlignCenter)
|
||||||
toolTipLabel:hide()
|
toolTipLabel:hide()
|
||||||
toolTipLabel.onMouseMove = function() moveToolTip() end
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -89,10 +88,18 @@ function g_tooltip.display(text)
|
|||||||
toolTipLabel:enable()
|
toolTipLabel:enable()
|
||||||
g_effects.fadeIn(toolTipLabel, 100)
|
g_effects.fadeIn(toolTipLabel, 100)
|
||||||
moveToolTip(true)
|
moveToolTip(true)
|
||||||
|
|
||||||
|
connect(rootWidget, {
|
||||||
|
onMouseMove = moveToolTip,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
function g_tooltip.hide()
|
function g_tooltip.hide()
|
||||||
g_effects.fadeOut(toolTipLabel, 100)
|
g_effects.fadeOut(toolTipLabel, 100)
|
||||||
|
|
||||||
|
disconnect(rootWidget, {
|
||||||
|
onMouseMove = moveToolTip,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user