Fix tooltip position updating

This commit is contained in:
Kamil Chojnowski 2019-07-02 01:30:19 +02:00
parent 15d8793a93
commit 09593e3382

View File

@ -62,7 +62,6 @@ function g_tooltip.init()
toolTipLabel:setBackgroundColor('#111111cc')
toolTipLabel:setTextAlign(AlignCenter)
toolTipLabel:hide()
toolTipLabel.onMouseMove = function() moveToolTip() end
end)
end
@ -89,10 +88,18 @@ function g_tooltip.display(text)
toolTipLabel:enable()
g_effects.fadeIn(toolTipLabel, 100)
moveToolTip(true)
connect(rootWidget, {
onMouseMove = moveToolTip,
})
end
function g_tooltip.hide()
g_effects.fadeOut(toolTipLabel, 100)
disconnect(rootWidget, {
onMouseMove = moveToolTip,
})
end