From 61b6f56b7d8a239940791534dbd82af743a1241f Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 11 Dec 2017 20:36:33 +0100 Subject: [PATCH] tooltip: prevent from being placed offscreen --- modules/tooltip.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/tooltip.lua b/modules/tooltip.lua index 4eb1bac7..8c17a6e5 100644 --- a/modules/tooltip.lua +++ b/modules/tooltip.lua @@ -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)