focus: enable native focus units for tbc

This commit is contained in:
shagu
2020-02-17 18:37:26 +01:00
parent f0019bd6a0
commit fdbf6715dc
3 changed files with 20 additions and 12 deletions
+13 -11
View File
@@ -1,3 +1,16 @@
pfUI:RegisterModule("focus", "vanilla:tbc", function ()
-- do not go further on disabled UFs
if C.unitframes.disable == "1" then return end
pfUI.uf.focus = pfUI.uf:CreateUnitFrame("Focus", nil, C.unitframes.focus, .2)
pfUI.uf.focus:UpdateFrameSize()
pfUI.uf.focus:SetPoint("BOTTOMLEFT", UIParent, "BOTTOM", 220, 220)
UpdateMovable(pfUI.uf.focus)
pfUI.uf.focus:Hide()
end)
-- register focus emulation commands for vanilla
if pfUI.client > 11200 then return end
SLASH_PFFOCUS1, SLASH_PFFOCUS2 = '/focus', '/pffocus'
function SlashCmdList.PFFOCUS(msg)
if not pfUI.uf or not pfUI.uf.focus then return end
@@ -75,14 +88,3 @@ function SlashCmdList.PFSWAPFOCUS(msg)
pfUI.uf.focus.unitname = oldunit
end
end
pfUI:RegisterModule("focus", "vanilla", function ()
-- do not go further on disabled UFs
if C.unitframes.disable == "1" then return end
pfUI.uf.focus = pfUI.uf:CreateUnitFrame("Focus", nil, C.unitframes.focus, .2)
pfUI.uf.focus:UpdateFrameSize()
pfUI.uf.focus:SetPoint("BOTTOMLEFT", UIParent, "BOTTOM", 220, 220)
UpdateMovable(pfUI.uf.focus)
pfUI.uf.focus:Hide()
end)