mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-13 00:42:40 +00:00
unitframes: use combined visibility handler
This commit is contained in:
@@ -2,18 +2,6 @@ pfUI:RegisterModule("targettarget", "vanilla:tbc", function ()
|
||||
-- do not go further on disabled UFs
|
||||
if C.unitframes.disable == "1" then return end
|
||||
|
||||
pfUI.uf.targettargetScanner = CreateFrame("Button",nil,UIParent)
|
||||
pfUI.uf.targettargetScanner:SetScript("OnUpdate", function()
|
||||
if pfUI.uf.targettarget.config.visible == "0" then return end
|
||||
if ( this.limit or 1) > GetTime() then return else this.limit = GetTime() + .2 end
|
||||
if UnitExists("targettarget") or (pfUI.unlock and pfUI.unlock:IsShown()) then
|
||||
pfUI.uf.targettarget:Show()
|
||||
else
|
||||
pfUI.uf.targettarget:Hide()
|
||||
pfUI.uf.targettarget.lastUnit = nil
|
||||
end
|
||||
end)
|
||||
|
||||
pfUI.uf.targettarget = pfUI.uf:CreateUnitFrame("TargetTarget", nil, C.unitframes.ttarget, .2)
|
||||
pfUI.uf.targettarget:UpdateFrameSize()
|
||||
pfUI.uf.targettarget:SetPoint("BOTTOM", UIParent , "BOTTOM", 0, 125)
|
||||
|
||||
Reference in New Issue
Block a user