I'm trying to hide and show some art based one whether DUF_FocusFrame and DUF_TargetOfTargetFrame is visible. The first thing I could think of was the following code.
Code:
local UrkFocus = CreateFrame("Frame",UrkFocus,UIParent)
UrkFocus:SetFrameStrata("BACKGROUND")
UrkFocus:SetWidth(341.5)
UrkFocus:SetHeight(341.5)
local o = UrkFocus:CreateTexture(UrkFocus,"LOW")
o:SetTexture("Interface\\AddOns\\Urk\\Custom\\focus.tga")
o:SetAllPoints(UrkFocus)
UrkFocus.texture = o
UrkFocus:SetPoint("BOTTOM",100,13)
UrkFocus:Show()
local UrkTot = CreateFrame("Frame",urkTot,UIParent)
UrkTot:SetFrameStrata("BACKGROUND")
UrkTot:SetWidth(341.5)
UrkTot:SetHeight(341.5)
local p = UrkTot:CreateTexture(Urk,"LOW")
p:SetTexture("Interface\\AddOns\\Urk\\Custom\\tot.tga")
p:SetAllPoints(UrkTot)
UrkTot.texture = p
UrkTot:SetPoint("BOTTOM",-100,13)
UrkTot:Show()
--toggle arts
function UrkFocus_Toggle()
if ( DUF_FocusFrame:IsShown() ) then
UrkFocus:Show();
else
UrkFocus:Hide();
end
end
function UrkTot_Toggle()
if ( DUF_TargetOfTargetFrame:IsShown() ) then
UrkTot:Show();
else
UrkTot:Hide();
end
end
The problem is, this doesn't work; and I was hoping someone could help me figure out how to do it.
Thanks for any help.