from retail

This commit is contained in:
Bunny67
2020-12-27 05:57:15 +03:00
parent 7cbc40c959
commit e0672fe539
31 changed files with 291 additions and 131 deletions
+15
View File
@@ -96,6 +96,21 @@ local function modify(parent, region, data)
region:SetWidth(region.width);
region:SetHeight(region.height);
local tooltipType = Private.CanHaveTooltip(data);
if(tooltipType and data.useTooltip) then
if not region.tooltipFrame then
region.tooltipFrame = CreateFrame("frame", nil, region);
region.tooltipFrame:SetAllPoints(region);
region.tooltipFrame:SetScript("OnEnter", function()
Private.ShowMouseoverTooltip(region, region);
end);
region.tooltipFrame:SetScript("OnLeave", Private.HideTooltip);
end
region.tooltipFrame:EnableMouse(true);
elseif region.tooltipFrame then
region.tooltipFrame:EnableMouse(false);
end
text:SetShadowColor(unpack(data.shadowColor))
text:SetShadowOffset(data.shadowXOffset, data.shadowYOffset)