tooltip: prevent from being placed offscreen

This commit is contained in:
shagu
2017-12-11 20:36:33 +01:00
parent 03d4d530fd
commit 61b6f56b7d
+6 -2
View File
@@ -1,6 +1,10 @@
pfUI:RegisterModule("tooltip", function ()
local alpha = tonumber(C.tooltip.alpha)
CreateBackdrop(GameTooltip, nil, nil, alpha)
local alpha = tonumber(C.tooltip.alpha)
CreateBackdrop(GameTooltip, nil, nil, alpha)
-- prevent tooltips from being placed offscreen
GameTooltip:SetClampedToScreen(true)
GameTooltipStatusBar:SetClampedToScreen(true)
if C.tooltip.position == "cursor" then
function _G.GameTooltip_SetDefaultAnchor(tooltip, parent)