View Single Post
11-18-22, 11:23 AM   #3
Dave B
A Defias Bandit
Join Date: Jul 2018
Posts: 3
Hiya, thanks for the feedback, the entire code of the section in question is

local function PrepareTooltip(frame, cell)
if frame == YssTooltip then
frame.YssDrop_OnLeave = frame:GetScript("OnLeave")
frame:EnableMouse(true)
frame:SetScript("OnLeave", GT_OnLeave)
-- copy look and scale of GameTooltip to keep things consistent
frame:SetBackdrop(_G.GameTooltip:GetBackdrop())
frame:SetBackdropBorderColor(GameTooltip:GetBackdropBorderColor())
frame:SetBackdropColor(GameTooltip:GetBackdropColor())
frame:SetScale(GameTooltip:GetScale())
end
frame:SetOwner(cell, "ANCHOR_NONE")
frame:ClearAllPoints()
local a1, a2 = GetAnchors(cell)
frame:SetPoint(a1, cell, a2)
end

I modified (based my reading of your comment) per below but getting an error message about line 61 (set owner) so clearly haven't got it in the right place

local function PrepareTooltip(frame, cell)
local frame = CreateFrame("frame", "frameName" or nil, frameParent or nil, "BackdropTemplate")
if frame == YssTooltip then
frame.YssDrop_OnLeave = frame:GetScript("OnLeave")
frame:EnableMouse(true)
frame:SetScript("OnLeave", GT_OnLeave)
-- copy look and scale of GameTooltip to keep things consistent
if not frame.SetBackdrop then
Mixin(frame,BackdropTemplateMixin)
end
frame:SetBackdrop(_G.GameTooltip:GetBackdrop())
frame:SetBackdropBorderColor(GameTooltip:GetBackdropBorderColor())
frame:SetBackdropColor(GameTooltip:GetBackdropColor())
frame:SetScale(GameTooltip:GetScale())
end
frame:SetOwner(cell, "ANCHOR_NONE")
frame:ClearAllPoints()
local a1, a2 = GetAnchors(cell)
frame:SetPoint(a1, cell, a2)
end
  Reply With Quote