mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 15:46:56 +00:00
unitframes: rewrite of debuff indicators
customizable size, position and appearance: - off: no indicators at all - legacy: tint the whole plate - glow: draws a glowing border - square: draw colored squares - icon: use generic icons
This commit is contained in:
+24
-2
@@ -160,6 +160,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "player", "verticalbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "player", "buff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "player", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "player", "debuff_ind_pos", "CENTER")
|
||||
pfUI:UpdateConfig("unitframes", "player", "debuff_ind_size", ".65")
|
||||
pfUI:UpdateConfig("unitframes", "player", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "player", "faderange", "0")
|
||||
pfUI:UpdateConfig("unitframes", "player", "glowaggro", "1")
|
||||
@@ -201,6 +203,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "target", "verticalbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "target", "buff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "target", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "target", "debuff_ind_pos", "CENTER")
|
||||
pfUI:UpdateConfig("unitframes", "target", "debuff_ind_size", ".65")
|
||||
pfUI:UpdateConfig("unitframes", "target", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "target", "faderange", "0")
|
||||
pfUI:UpdateConfig("unitframes", "target", "glowaggro", "1")
|
||||
@@ -243,6 +247,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "focus", "verticalbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "buff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "debuff_ind_pos", "CENTER")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "debuff_ind_size", ".65")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "faderange", "0")
|
||||
pfUI:UpdateConfig("unitframes", "focus", "glowaggro", "1")
|
||||
@@ -283,7 +289,9 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "group", "invert_healthbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "group", "verticalbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "group", "buff_indicator", "1")
|
||||
pfUI:UpdateConfig("unitframes", "group", "debuff_indicator", "1")
|
||||
pfUI:UpdateConfig("unitframes", "group", "debuff_indicator", "2")
|
||||
pfUI:UpdateConfig("unitframes", "group", "debuff_ind_pos", "CENTER")
|
||||
pfUI:UpdateConfig("unitframes", "group", "debuff_ind_size", ".65")
|
||||
pfUI:UpdateConfig("unitframes", "group", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "group", "faderange", "1")
|
||||
pfUI:UpdateConfig("unitframes", "group", "glowaggro", "1")
|
||||
@@ -326,6 +334,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "verticalbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "buff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "debuff_ind_pos", "CENTER")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "debuff_ind_size", ".65")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "faderange", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouptarget", "glowaggro", "1")
|
||||
@@ -367,6 +377,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "verticalbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "buff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "debuff_ind_pos", "CENTER")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "debuff_ind_size", ".65")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "faderange", "1")
|
||||
pfUI:UpdateConfig("unitframes", "grouppet", "glowaggro", "1")
|
||||
@@ -407,7 +419,9 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "raid", "invert_healthbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "verticalbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "buff_indicator", "1")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "debuff_indicator", "1")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "debuff_indicator", "2")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "debuff_ind_pos", "CENTER")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "debuff_ind_size", ".65")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "faderange", "1")
|
||||
pfUI:UpdateConfig("unitframes", "raid", "glowaggro", "1")
|
||||
@@ -449,6 +463,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "verticalbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "buff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "debuff_ind_pos", "CENTER")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "debuff_ind_size", ".65")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "faderange", "0")
|
||||
pfUI:UpdateConfig("unitframes", "ttarget", "glowaggro", "1")
|
||||
@@ -490,6 +506,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "pet", "verticalbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "buff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "debuff_ind_pos", "CENTER")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "debuff_ind_size", ".65")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "faderange", "0")
|
||||
pfUI:UpdateConfig("unitframes", "pet", "glowaggro", "1")
|
||||
@@ -531,6 +549,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "ptarget", "verticalbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "ptarget", "buff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "ptarget", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "ptarget", "debuff_ind_pos", "CENTER")
|
||||
pfUI:UpdateConfig("unitframes", "ptarget", "debuff_ind_size", ".65")
|
||||
pfUI:UpdateConfig("unitframes", "ptarget", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "ptarget", "faderange", "0")
|
||||
pfUI:UpdateConfig("unitframes", "ptarget", "glowaggro", "1")
|
||||
@@ -572,6 +592,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "verticalbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "buff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "debuff_indicator", "0")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "debuff_ind_pos", "CENTER")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "debuff_ind_size", ".65")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "clickcast", "0")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "faderange", "0")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "glowaggro", "1")
|
||||
|
||||
+154
-102
@@ -860,49 +860,54 @@ function pfUI.uf:RefreshUnitAnimation(unitframe)
|
||||
end
|
||||
end
|
||||
|
||||
function pfUI.uf:RefreshUnitState(unitframe)
|
||||
if UnitIsConnected(this.label .. this.id) or (pfUI.unlock and pfUI.unlock:IsShown()) then
|
||||
-- online (or unlock)
|
||||
if unitframe.config.faderange == "1" then
|
||||
if pfUI.api.UnitInRange(unitframe.label .. unitframe.id, 4) or (pfUI.unlock and pfUI.unlock:IsShown()) then
|
||||
if unitframe:GetAlpha() ~= 1 then
|
||||
unitframe:SetAlpha(1)
|
||||
if unitframe.config.portrait == "bar" then
|
||||
unitframe.portrait:SetAlpha(pfUI_config.unitframes.portraitalpha)
|
||||
end
|
||||
end
|
||||
else
|
||||
if unitframe:GetAlpha() ~= .5 then
|
||||
unitframe:SetAlpha(.5)
|
||||
if unitframe.config.portrait == "bar" then
|
||||
unitframe.portrait:SetAlpha(pfUI_config.unitframes.portraitalpha)
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
if unitframe:GetAlpha() ~= 1 then
|
||||
unitframe:SetAlpha(1)
|
||||
if unitframe.config.portrait == "bar" then
|
||||
unitframe.portrait:SetAlpha(pfUI_config.unitframes.portraitalpha)
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
-- offline
|
||||
unitframe.hp.bar:SetMinMaxValues(0, 100)
|
||||
unitframe.power.bar:SetMinMaxValues(0, 100)
|
||||
unitframe.hp.bar:SetValue(0)
|
||||
unitframe.power.bar:SetValue(0)
|
||||
function pfUI.uf:RefreshUnitState(unit)
|
||||
local alpha = 1
|
||||
local unlock = pfUI.unlock and pfUI.unlock:IsShown() or nil
|
||||
|
||||
if ( unitframe.label == "party" or unitframe.label == "raid" ) and unitframe:GetAlpha() ~= .25 then
|
||||
unitframe:SetAlpha(.25)
|
||||
if unitframe.config.portrait == "bar" then
|
||||
unitframe.portrait:SetAlpha(pfUI_config.unitframes.portraitalpha)
|
||||
end
|
||||
if not UnitIsConnected(unit.label .. unit.id) and not unlock then
|
||||
-- offline
|
||||
alpha = .25
|
||||
unit.hp.bar:SetMinMaxValues(0, 100)
|
||||
unit.power.bar:SetMinMaxValues(0, 100)
|
||||
unit.hp.bar:SetValue(0)
|
||||
unit.power.bar:SetValue(0)
|
||||
elseif unit.config.faderange == "1" and not pfUI.api.UnitInRange(unit.label .. unit.id, 4) and not unlock then
|
||||
alpha = .5
|
||||
end
|
||||
|
||||
-- skip if alpha is already correct
|
||||
if floor(unit:GetAlpha()*10+.5) == floor(alpha*10+.5) then return end
|
||||
|
||||
-- set unitframe alpha
|
||||
unit:SetAlpha(alpha)
|
||||
|
||||
-- refresh portrait alpha
|
||||
if unit.config.portrait == "bar" then
|
||||
unit.portrait:SetAlpha(pfUI_config.unitframes.portraitalpha)
|
||||
end
|
||||
|
||||
-- refresh debuff indicator alpha
|
||||
local disptype = unit.config.debuff_indicator
|
||||
local indicator = unit.hp.bar.debuffindicators
|
||||
if indicator then
|
||||
indicator:SetAlpha(0)
|
||||
if ( disptype == "4" or disptype == "3" ) then
|
||||
indicator:SetAlpha(1)
|
||||
elseif disptype == "2" then
|
||||
indicator:SetAlpha(.4)
|
||||
elseif disptype == "1" then
|
||||
indicator:SetAlpha(.2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local pfDebuffColors = {
|
||||
["Magic"] = { 0.1, 0.7, 0.8, 1 },
|
||||
["Poison"] = { 0.2, 0.7, 0.3, 1 },
|
||||
["Curse"] = { 0.6, 0.2, 0.6, 1 },
|
||||
["Disease"] = { 0.9, 0.7, 0.2, 1 }
|
||||
}
|
||||
|
||||
function pfUI.uf:RefreshUnit(unit, component)
|
||||
-- break early on misconfigured UF's
|
||||
if not unit.label then return end
|
||||
@@ -1152,71 +1157,116 @@ function pfUI.uf:RefreshUnit(unit, component)
|
||||
-- indicators
|
||||
if component == "all" or component == "aura" then
|
||||
pfUI.uf:SetupDebuffFilter()
|
||||
if table.getn(pfUI.uf.debuffs) > 0 and unit.config.debuff_indicator == "1" then
|
||||
local infected = false
|
||||
for i=1,32 do
|
||||
local _,_,dtype = UnitDebuff(unitstr, i)
|
||||
if dtype then
|
||||
for _, filter in pairs(pfUI.uf.debuffs) do
|
||||
if filter == string.lower(dtype) then
|
||||
if dtype == "Magic" then
|
||||
if not unit.hp.bar.magic then
|
||||
unit.hp.bar.magic = CreateFrame("Frame", unit.hp.bar)
|
||||
unit.hp.bar.magic:SetAllPoints(unit)
|
||||
unit.hp.bar.magic:SetParent(unit.hp.bar)
|
||||
unit.hp.bar.magic.tex = unit.hp.bar.magic:CreateTexture("OVERLAY")
|
||||
unit.hp.bar.magic.tex:SetAllPoints(unit.hp.bar.magic)
|
||||
unit.hp.bar.magic.tex:SetTexture(.2,.8,.8,.4)
|
||||
end
|
||||
unit.hp.bar.magic:Show()
|
||||
infected = true
|
||||
if table.getn(pfUI.uf.debuffs) > 0 and unit.config.debuff_indicator ~= "0" then
|
||||
unit.hp.bar.debuffindicators = unit.hp.bar.debuffindicators or CreateFrame("Frame", nil, unit.hp.bar)
|
||||
|
||||
elseif dtype == "Poison" then
|
||||
if not unit.hp.bar.poison then
|
||||
unit.hp.bar.poison = CreateFrame("Frame", unit.hp.bar)
|
||||
unit.hp.bar.poison:SetAllPoints(unit)
|
||||
unit.hp.bar.poison:SetParent(unit.hp.bar)
|
||||
unit.hp.bar.poison.tex = unit.hp.bar.poison:CreateTexture("OVERLAY")
|
||||
unit.hp.bar.poison.tex:SetAllPoints(unit.hp.bar.poison)
|
||||
unit.hp.bar.poison.tex:SetTexture(.2,.8,.2,.4)
|
||||
end
|
||||
unit.hp.bar.poison:Show()
|
||||
infected = true
|
||||
-- 0 = OFF, 1 = Legacy, 2 = Glow, 3 = Square, 4 = Icons
|
||||
local disptype = unit.config.debuff_indicator
|
||||
local indicator = unit.hp.bar.debuffindicators
|
||||
local indipos = unit.config.debuff_ind_pos
|
||||
local count = 0
|
||||
local size
|
||||
|
||||
elseif dtype == "Curse" then
|
||||
if not unit.hp.bar.curse then
|
||||
unit.hp.bar.curse = CreateFrame("Frame", unit.hp.bar)
|
||||
unit.hp.bar.curse:SetAllPoints(unit)
|
||||
unit.hp.bar.curse:SetParent(unit.hp.bar)
|
||||
unit.hp.bar.curse.tex = unit.hp.bar.curse:CreateTexture("OVERLAY")
|
||||
unit.hp.bar.curse.tex:SetAllPoints(unit.hp.bar.curse)
|
||||
unit.hp.bar.curse.tex:SetTexture(.8,.2,.8,.4)
|
||||
end
|
||||
unit.hp.bar.curse:Show()
|
||||
infected = true
|
||||
|
||||
elseif dtype == "Disease" then
|
||||
if not unit.hp.bar.disease then
|
||||
unit.hp.bar.disease = CreateFrame("Frame", unit.hp.bar)
|
||||
unit.hp.bar.disease:SetAllPoints(unit)
|
||||
unit.hp.bar.disease:SetParent(unit.hp.bar)
|
||||
unit.hp.bar.disease.tex = unit.hp.bar.disease:CreateTexture("OVERLAY")
|
||||
unit.hp.bar.disease.tex:SetAllPoints(unit.hp.bar.disease)
|
||||
unit.hp.bar.disease.tex:SetTexture(.8,.8,.2,.4)
|
||||
end
|
||||
unit.hp.bar.disease:Show()
|
||||
infected = true
|
||||
end
|
||||
end
|
||||
end
|
||||
if disptype == "4" or disptype == "3" then
|
||||
size = unit.hp.bar:GetHeight() * tonumber(unit.config.debuff_ind_size)
|
||||
if size ~= indicator.size or disptype ~= indicator.disp or indipos ~= indicator.ipos then
|
||||
indicator:ClearAllPoints()
|
||||
indicator:SetPoint(indipos, 0, 0)
|
||||
indicator:SetHeight(size)
|
||||
indicator:SetWidth(size)
|
||||
indicator.size = size
|
||||
indicator.disp = disptype
|
||||
indicator.ipos = indipos
|
||||
end
|
||||
elseif disptype == "2" or disptype == "1" then
|
||||
size = "FULL"
|
||||
if size ~= indicator.size or disptype ~= indicator.disp or indipos ~= indicator.ipos then
|
||||
indicator:ClearAllPoints()
|
||||
indicator:SetAllPoints(unit.hp.bar)
|
||||
indicator.size = size
|
||||
indicator.disp = disptype
|
||||
indicator.ipos = indipos
|
||||
end
|
||||
end
|
||||
if infected == false then
|
||||
if unit.hp.bar.magic then unit.hp.bar.magic:Hide() end
|
||||
if unit.hp.bar.poison then unit.hp.bar.poison:Hide() end
|
||||
if unit.hp.bar.curse then unit.hp.bar.curse:Hide() end
|
||||
if unit.hp.bar.disease then unit.hp.bar.disease:Hide() end
|
||||
|
||||
for _, debuff in pairs(pfUI.uf.debuffs) do
|
||||
indicator[debuff] = indicator[debuff] or CreateFrame("Frame", nil, indicator)
|
||||
indicator[debuff]:SetParent(indicator)
|
||||
indicator[debuff].tex = indicator[debuff].tex or indicator[debuff]:CreateTexture(nil)
|
||||
indicator[debuff].tex:SetAllPoints(indicator[debuff])
|
||||
|
||||
if indicator.size ~= indicator[debuff].size or disptype ~= indicator[debuff].disp then
|
||||
if disptype == "4" then
|
||||
indicator[debuff].tex:SetTexture("Interface\\AddOns\\pfUI\\img\\debuffs\\" .. debuff)
|
||||
indicator[debuff].tex:SetVertexColor(unpack(pfDebuffColors[debuff]))
|
||||
indicator[debuff].tex:Show()
|
||||
indicator[debuff]:ClearAllPoints()
|
||||
indicator[debuff]:SetHeight(size)
|
||||
indicator[debuff]:SetWidth(size)
|
||||
indicator[debuff]:SetBackdrop(nil)
|
||||
elseif disptype == "3" then
|
||||
indicator[debuff].tex:SetTexture(unpack(pfDebuffColors[debuff]))
|
||||
indicator[debuff].tex:SetVertexColor(1,1,1,1)
|
||||
indicator[debuff].tex:Show()
|
||||
indicator[debuff]:ClearAllPoints()
|
||||
indicator[debuff]:SetHeight(size)
|
||||
indicator[debuff]:SetWidth(size)
|
||||
indicator[debuff]:SetBackdrop(nil)
|
||||
elseif disptype == "2" then
|
||||
indicator[debuff].tex:Hide()
|
||||
indicator[debuff]:SetAllPoints(unit.hp.bar)
|
||||
indicator[debuff]:SetBackdrop({
|
||||
edgeFile = "Interface\\AddOns\\pfUI\\img\\glow", edgeSize = 8,
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0},
|
||||
})
|
||||
indicator[debuff]:SetBackdropBorderColor(unpack(pfDebuffColors[debuff]))
|
||||
elseif disptype == "1" then
|
||||
indicator[debuff].tex:SetTexture(unpack(pfDebuffColors[debuff]))
|
||||
indicator[debuff].tex:SetVertexColor(1,1,1,1)
|
||||
indicator[debuff].tex:Show()
|
||||
indicator[debuff]:SetAllPoints(unit.hp.bar)
|
||||
indicator[debuff]:SetBackdrop(nil)
|
||||
end
|
||||
|
||||
indicator[debuff].size = indicator.size
|
||||
indicator[debuff].disp = indicator.disp
|
||||
end
|
||||
|
||||
indicator[debuff].visible = nil
|
||||
|
||||
for i=1,16 do
|
||||
local _, _, dtype = UnitDebuff(unitstr, i)
|
||||
if dtype == debuff then
|
||||
indicator[debuff].visible = true
|
||||
end
|
||||
end
|
||||
|
||||
if indicator[debuff].visible then
|
||||
indicator[debuff]:Show()
|
||||
indicator:Show()
|
||||
indicator:SetAlpha(0)
|
||||
if disptype == "4" or disptype == "3" then
|
||||
indicator:SetAlpha(1)
|
||||
elseif disptype == "2" then
|
||||
indicator:SetAlpha(.4)
|
||||
elseif disptype == "1" then
|
||||
indicator:SetAlpha(.2)
|
||||
end
|
||||
|
||||
if disptype == "4" or disptype == "3" then
|
||||
indicator[debuff]:SetPoint("LEFT", indicator, "LEFT", count*(size+1), 0)
|
||||
count = count + 1
|
||||
end
|
||||
else
|
||||
indicator[debuff]:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
if disptype == "4" or disptype == "3" then
|
||||
indicator:SetWidth(count*(size+1))
|
||||
end
|
||||
elseif unit.hp.bar.debuffindicators then
|
||||
unit.hp.bar.debuffindicators:Hide()
|
||||
end
|
||||
|
||||
pfUI.uf:SetupBuffFilter()
|
||||
@@ -1379,6 +1429,8 @@ function pfUI.uf:RefreshUnit(unit, component)
|
||||
unit.hp.bar:SetStatusBarColor(.5,.5,.5,.5)
|
||||
end
|
||||
end
|
||||
|
||||
pfUI.uf:RefreshUnitState(unit)
|
||||
end
|
||||
|
||||
function pfUI.uf:ClickAction(button)
|
||||
@@ -1507,19 +1559,19 @@ function pfUI.uf:SetupDebuffFilter()
|
||||
local _, myclass = UnitClass("player")
|
||||
pfUI.uf.debuffs = {}
|
||||
if myclass == "PALADIN" or myclass == "PRIEST" or myclass == "WARLOCK" or pfUI_config.unitframes.debuffs_class == "0" then
|
||||
table.insert(pfUI.uf.debuffs, "magic")
|
||||
table.insert(pfUI.uf.debuffs, "Magic")
|
||||
end
|
||||
|
||||
if myclass == "DRUID" or myclass == "PALADIN" or myclass == "SHAMAN" or pfUI_config.unitframes.debuffs_class == "0" then
|
||||
table.insert(pfUI.uf.debuffs, "poison")
|
||||
table.insert(pfUI.uf.debuffs, "Poison")
|
||||
end
|
||||
|
||||
if myclass == "PRIEST" or myclass == "PALADIN" or myclass == "SHAMAN" or pfUI_config.unitframes.debuffs_class == "0" then
|
||||
table.insert(pfUI.uf.debuffs, "disease")
|
||||
table.insert(pfUI.uf.debuffs, "Disease")
|
||||
end
|
||||
|
||||
if myclass == "DRUID" or myclass == "MAGE" or pfUI_config.unitframes.debuffs_class == "0" then
|
||||
table.insert(pfUI.uf.debuffs, "curse")
|
||||
table.insert(pfUI.uf.debuffs, "Curse")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
+52
-18
@@ -491,6 +491,23 @@ pfUI:RegisterModule("gui", function ()
|
||||
"off:" .. T["Disabled"]
|
||||
}
|
||||
|
||||
pfUI.gui.dropdowns.uf_debuff_indicator = {
|
||||
"0:" .. T["Disabled"],
|
||||
"1:" .. T["Legacy"],
|
||||
"2:" .. T["Glow"],
|
||||
"3:" .. T["Square"],
|
||||
"4:" .. T["Icon"]
|
||||
}
|
||||
|
||||
pfUI.gui.dropdowns.uf_debuff_indicator_size = {
|
||||
".10:" .. T["10%"],
|
||||
".25:" .. T["25%"],
|
||||
".35:" .. T["35%"],
|
||||
".50:" .. T["50%"],
|
||||
".65:" .. T["65%"],
|
||||
".75:" .. T["75%"],
|
||||
".90:" .. T["90%"],
|
||||
}
|
||||
|
||||
pfUI.gui.dropdowns.uf_layout = {
|
||||
"default:" .. T["Default"],
|
||||
@@ -559,6 +576,18 @@ pfUI:RegisterModule("gui", function ()
|
||||
"off:" .. T["Disabled"]
|
||||
}
|
||||
|
||||
pfUI.gui.dropdowns.positions = {
|
||||
"TOPLEFT:" .. T["Top Left"],
|
||||
"TOP:" .. T["Top"],
|
||||
"TOPRIGHT:" .. T["Top Right"],
|
||||
"LEFT:" .. T["Left"],
|
||||
"CENTER:" .. T["Center"],
|
||||
"RIGHT:" .. T["Right"],
|
||||
"BOTTOMLEFT:" .. T["Bottom Left"],
|
||||
"BOTTOM:" .. T["Bottom"],
|
||||
"BOTTOMRIGHT:" .. T["Bottom Right"],
|
||||
}
|
||||
|
||||
pfUI.gui.dropdowns.num_actionbar_buttons = BarLayoutOptions(NUM_ACTIONBAR_BUTTONS)
|
||||
pfUI.gui.dropdowns.num_shapeshift_slots = BarLayoutOptions(NUM_SHAPESHIFT_SLOTS)
|
||||
pfUI.gui.dropdowns.num_pet_action_slots = BarLayoutOptions(NUM_PET_ACTION_SLOTS)
|
||||
@@ -858,7 +887,6 @@ pfUI:RegisterModule("gui", function ()
|
||||
|
||||
-- build config entries
|
||||
CreateConfig(update[c], this, T["Display Frame"] .. ": " .. t, C.unitframes[c], "visible", "checkbox")
|
||||
CreateConfig(update[c], this, T["Show PvP-Flag Indicator"], C.unitframes[c], "showPVP", "checkbox")
|
||||
CreateConfig(update[c], this, T["Enable Mouseover Tooltip"], C.unitframes[c], "showtooltip", "checkbox")
|
||||
CreateConfig(update[c], this, T["Enable Clickcast"], C.unitframes[c], "clickcast", "checkbox")
|
||||
CreateConfig(update[c], this, T["Enable Range Fading"], C.unitframes[c], "faderange", "checkbox")
|
||||
@@ -867,6 +895,8 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(update[c], this, T["Portrait Position"], C.unitframes[c], "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position)
|
||||
CreateConfig(update[c], this, T["Status Bar Texture"], C.unitframes[c], "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture)
|
||||
CreateConfig(update[c], this, T["UnitFrame Spacing"], C.unitframes[c], "pspace")
|
||||
CreateConfig(update[c], this, T["Show PvP-Flag"], C.unitframes[c], "showPVP", "checkbox")
|
||||
CreateConfig(update[c], this, T["Buffs Class Buffs"], C.unitframes[c], "buff_indicator", "checkbox")
|
||||
|
||||
CreateConfig(update[c], this, T["Healthbar"], nil, nil, "header")
|
||||
CreateConfig(update[c], this, T["Health Bar Width"], C.unitframes[c], "width")
|
||||
@@ -885,19 +915,10 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(update[c], this, T["Right Text"], C.unitframes[c], "txtpowerright", "dropdown", pfUI.gui.dropdowns.uf_texts)
|
||||
CreateConfig(update[c], this, T["Power Bar Anchor"], C.unitframes[c], "panchor", "dropdown", pfUI.gui.dropdowns.uf_powerbar_position)
|
||||
|
||||
CreateConfig(update[c], this, T["Buffs"], nil, nil, "header")
|
||||
CreateConfig(update[c], this, T["Buff Position"], C.unitframes[c], "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position)
|
||||
CreateConfig(update[c], this, T["Buff Size"], C.unitframes[c], "buffsize")
|
||||
CreateConfig(update[c], this, T["Buff Limit"], C.unitframes[c], "bufflimit")
|
||||
CreateConfig(update[c], this, T["Buffs Per Row"], C.unitframes[c], "buffperrow")
|
||||
CreateConfig(update[c], this, T["Enable Buff Indicators"], C.unitframes[c], "buff_indicator", "checkbox")
|
||||
|
||||
CreateConfig(update[c], this, T["Debuffs"], nil, nil, "header")
|
||||
CreateConfig(update[c], this, T["Debuff Position"], C.unitframes[c], "debuffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position)
|
||||
CreateConfig(update[c], this, T["Debuff Size"], C.unitframes[c], "debuffsize")
|
||||
CreateConfig(update[c], this, T["Debuff Limit"], C.unitframes[c], "debufflimit")
|
||||
CreateConfig(update[c], this, T["Debuffs Per Row"], C.unitframes[c], "debuffperrow")
|
||||
CreateConfig(update[c], this, T["Enable Debuff Indicators"], C.unitframes[c], "debuff_indicator", "checkbox")
|
||||
CreateConfig(update[c], this, T["Combat Text"], nil, nil, "header")
|
||||
CreateConfig(update[c], this, T["Show Combat Text"], C.unitframes[c], "hitindicator", "checkbox")
|
||||
CreateConfig(update[c], this, T["Combat Text Font"], C.unitframes[c], "hitindicatorfont", "dropdown", pfUI.gui.dropdowns.fonts)
|
||||
CreateConfig(update[c], this, T["Combat Text Size"], C.unitframes[c], "hitindicatorsize")
|
||||
|
||||
CreateConfig(update[c], this, T["Text Colors"], nil, nil, "header")
|
||||
CreateConfig(update[c], this, T["Enable Health Color"], C.unitframes[c], "healthcolor", "checkbox")
|
||||
@@ -905,10 +926,23 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(update[c], this, T["Enable Level Color"], C.unitframes[c], "levelcolor", "checkbox")
|
||||
CreateConfig(update[c], this, T["Enable Class Color"], C.unitframes[c], "classcolor", "checkbox")
|
||||
|
||||
CreateConfig(update[c], this, T["Hit Indicator"], nil, nil, "header")
|
||||
CreateConfig(update[c], this, T["Enable Hit Indicator"], C.unitframes[c], "hitindicator", "checkbox")
|
||||
CreateConfig(update[c], this, T["Hit Indicator Text Font"], C.unitframes[c], "hitindicatorfont", "dropdown", pfUI.gui.dropdowns.fonts)
|
||||
CreateConfig(update[c], this, T["Hit Indicator Text Size"], C.unitframes[c], "hitindicatorsize")
|
||||
CreateConfig(update[c], this, T["Debuff Indicators"], nil, nil, "header")
|
||||
CreateConfig(update[c], this, T["Debuff Indicator Display"], C.unitframes[c], "debuff_indicator", "dropdown", pfUI.gui.dropdowns.uf_debuff_indicator)
|
||||
CreateConfig(update[c], this, T["Debuff Indicator Position"], C.unitframes[c], "debuff_ind_pos", "dropdown", pfUI.gui.dropdowns.positions)
|
||||
CreateConfig(update[c], this, T["Debuff Indicator Size"], C.unitframes[c], "debuff_ind_size", "dropdown", pfUI.gui.dropdowns.uf_debuff_indicator_size)
|
||||
|
||||
CreateConfig(update[c], this, T["Buffs"], nil, nil, "header")
|
||||
CreateConfig(update[c], this, T["Buff Position"], C.unitframes[c], "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position)
|
||||
CreateConfig(update[c], this, T["Buff Size"], C.unitframes[c], "buffsize")
|
||||
CreateConfig(update[c], this, T["Buff Limit"], C.unitframes[c], "bufflimit")
|
||||
CreateConfig(update[c], this, T["Buffs Per Row"], C.unitframes[c], "buffperrow")
|
||||
|
||||
CreateConfig(update[c], this, T["Debuffs"], nil, nil, "header")
|
||||
CreateConfig(update[c], this, T["Debuff Position"], C.unitframes[c], "debuffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position)
|
||||
CreateConfig(update[c], this, T["Debuff Size"], C.unitframes[c], "debuffsize")
|
||||
CreateConfig(update[c], this, T["Debuff Limit"], C.unitframes[c], "debufflimit")
|
||||
CreateConfig(update[c], this, T["Debuffs Per Row"], C.unitframes[c], "debuffperrow")
|
||||
|
||||
this.setup = true
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
## Title: |cff33ffccpf|cffffffffUI
|
||||
## Author: Shagu
|
||||
## Notes: A complete user interface replacement.
|
||||
## Version: 3.14.2
|
||||
## Version: 3.15
|
||||
## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache
|
||||
## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB
|
||||
|
||||
|
||||
Reference in New Issue
Block a user