From 9d568e830f152e2f9ca4f1d2187ca49cfd0581f5 Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 10 Dec 2016 16:45:55 +0100 Subject: [PATCH] modules: make tooltip module independent --- modules/tooltip.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/tooltip.lua b/modules/tooltip.lua index 21980c9f..d67ad47d 100644 --- a/modules/tooltip.lua +++ b/modules/tooltip.lua @@ -42,9 +42,15 @@ pfUI.utils:CreateBackdrop( GameTooltip) if GameTooltip:GetAnchorType() == "ANCHOR_NONE" then GameTooltip:ClearAllPoints() if pfUI_config.tooltip.position == "bottom" then - GameTooltip:SetPoint("BOTTOMRIGHT",pfUI.panel.right,"TOPRIGHT",0,pfUI_config.appearance.border.default*2) + if pfUI.panel then + GameTooltip:SetPoint("BOTTOMRIGHT", pfUI.panel.right, "TOPRIGHT", 0, pfUI_config.appearance.border.default*2) + else + GameTooltip:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, -pfUI_config.appearance.border.default*2) + end elseif pfUI_config.tooltip.position == "chat" then - GameTooltip:SetPoint("BOTTOMRIGHT",pfUI.chat.right,"TOPRIGHT",0,pfUI_config.appearance.border.default*2) + local anchor = ChatFrame3 + if pfUI.chat then anchor = pfUI.chat.right end + GameTooltip:SetPoint("BOTTOMRIGHT", anchor, "TOPRIGHT", 0, pfUI_config.appearance.border.default*2) end end end)