Skip to content

Commit

Permalink
Tooltip fix
Browse files Browse the repository at this point in the history
Not sure where this came from, but it was in my TBC version and wasn't in the repo. Solves a bug that was keeping the tooltip from loading.
  • Loading branch information
watsonian committed Sep 13, 2022
1 parent d4fcfa6 commit 7516cc6
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions tooltip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ local addonName, addonTable = ...
local tooltip = {}
addonTable.tooltip = tooltip


local defaultBackdrop = {
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true,
tileSize = 16,
edgeSize = 16,
insets = {left = 4, right = 4, top = 4, bottom = 4,}
}


local CreateFrame = _G.CreateFrame
local UIParent = _G.UIParent
local GameTooltip = _G.GameTooltip
Expand Down Expand Up @@ -205,12 +216,9 @@ function tooltip:Clear(...)
ResetTooltipSize()

-- pull current GameTooltip values
local backdrop = GameTooltip:GetBackdrop()
tframe:SetBackdrop(backdrop)
if backdrop then
tframe:SetBackdropColor(GameTooltip:GetBackdropColor())
tframe:SetBackdropBorderColor(GameTooltip:GetBackdropBorderColor())
end
--local backdrop = GameTooltip:GetBackdrop()
tframe:SetBackdrop(defaultBackdrop)
tframe:SetBackdropColor(0,0,0,1)
tframe:SetScale(GameTooltip:GetScale())
tframe.font = _G.GameTooltipText
tframe.headerFont = _G.GameTooltipHeaderText
Expand Down

0 comments on commit 7516cc6

Please sign in to comment.