skin: add Tooltips

This commit is contained in:
Artur Morozov
2019-03-31 14:59:21 +02:00
committed by shagu
parent 4e90604c49
commit 6a580f198b
4 changed files with 20 additions and 35 deletions
+19
View File
@@ -0,0 +1,19 @@
pfUI:RegisterSkin("Tooltips", function ()
local border = tonumber(C.appearance.border.default)
local alpha = tonumber(C.tooltip.alpha)
for _, tooltip in pairs({GameTooltip, ItemRefTooltip, ShoppingTooltip1, ShoppingTooltip2, WorldMapTooltip}) do
CreateBackdrop(tooltip, nil, nil, alpha)
end
SkinCloseButton(ItemRefCloseButton, ItemRefTooltip, -6, -6)
for _, tooltip in pairs({ShoppingTooltip1, ShoppingTooltip2}) do
tooltip:SetClampedToScreen(true)
tooltip:SetScript("OnShow", function()
local a, b, c, x, y = this:GetPoint()
if not x or x == 0 then x = (border*2) + ( x or 0 ) + 1 end
if a then this:SetPoint(a, b, c, x, y) end
end)
end
end)