mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-17 18:20:49 +00:00
unitframes: add more buff/debuff positions
This commit is contained in:
+24
-13
@@ -203,11 +203,11 @@ function pfUI:LoadConfig()
|
|||||||
pfUI:UpdateConfig("unitframes", "player", "pwidth", "-1")
|
pfUI:UpdateConfig("unitframes", "player", "pwidth", "-1")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "panchor", "TOP")
|
pfUI:UpdateConfig("unitframes", "player", "panchor", "TOP")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "pspace", "-3")
|
pfUI:UpdateConfig("unitframes", "player", "pspace", "-3")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "buffs", "top")
|
pfUI:UpdateConfig("unitframes", "player", "buffs", "TOPLEFT")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "buffsize", "20")
|
pfUI:UpdateConfig("unitframes", "player", "buffsize", "20")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "bufflimit", "32")
|
pfUI:UpdateConfig("unitframes", "player", "bufflimit", "32")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "buffperrow", "8")
|
pfUI:UpdateConfig("unitframes", "player", "buffperrow", "8")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "debuffs", "top")
|
pfUI:UpdateConfig("unitframes", "player", "debuffs", "TOPLEFT")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "debuffsize", "20")
|
pfUI:UpdateConfig("unitframes", "player", "debuffsize", "20")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "debufflimit", "32")
|
pfUI:UpdateConfig("unitframes", "player", "debufflimit", "32")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "debuffperrow", "8")
|
pfUI:UpdateConfig("unitframes", "player", "debuffperrow", "8")
|
||||||
@@ -246,11 +246,11 @@ function pfUI:LoadConfig()
|
|||||||
pfUI:UpdateConfig("unitframes", "target", "pwidth", "-1")
|
pfUI:UpdateConfig("unitframes", "target", "pwidth", "-1")
|
||||||
pfUI:UpdateConfig("unitframes", "target", "panchor", "TOP")
|
pfUI:UpdateConfig("unitframes", "target", "panchor", "TOP")
|
||||||
pfUI:UpdateConfig("unitframes", "target", "pspace", "-3")
|
pfUI:UpdateConfig("unitframes", "target", "pspace", "-3")
|
||||||
pfUI:UpdateConfig("unitframes", "target", "buffs", "top")
|
pfUI:UpdateConfig("unitframes", "target", "buffs", "TOPLEFT")
|
||||||
pfUI:UpdateConfig("unitframes", "target", "buffsize", "20")
|
pfUI:UpdateConfig("unitframes", "target", "buffsize", "20")
|
||||||
pfUI:UpdateConfig("unitframes", "target", "bufflimit", "32")
|
pfUI:UpdateConfig("unitframes", "target", "bufflimit", "32")
|
||||||
pfUI:UpdateConfig("unitframes", "target", "buffperrow", "8")
|
pfUI:UpdateConfig("unitframes", "target", "buffperrow", "8")
|
||||||
pfUI:UpdateConfig("unitframes", "target", "debuffs", "top")
|
pfUI:UpdateConfig("unitframes", "target", "debuffs", "TOPLEFT")
|
||||||
pfUI:UpdateConfig("unitframes", "target", "debuffsize", "20")
|
pfUI:UpdateConfig("unitframes", "target", "debuffsize", "20")
|
||||||
pfUI:UpdateConfig("unitframes", "target", "debufflimit", "32")
|
pfUI:UpdateConfig("unitframes", "target", "debufflimit", "32")
|
||||||
pfUI:UpdateConfig("unitframes", "target", "debuffperrow", "8")
|
pfUI:UpdateConfig("unitframes", "target", "debuffperrow", "8")
|
||||||
@@ -290,11 +290,11 @@ function pfUI:LoadConfig()
|
|||||||
pfUI:UpdateConfig("unitframes", "focus", "pwidth", "-1")
|
pfUI:UpdateConfig("unitframes", "focus", "pwidth", "-1")
|
||||||
pfUI:UpdateConfig("unitframes", "focus", "panchor", "TOP")
|
pfUI:UpdateConfig("unitframes", "focus", "panchor", "TOP")
|
||||||
pfUI:UpdateConfig("unitframes", "focus", "pspace", "-3")
|
pfUI:UpdateConfig("unitframes", "focus", "pspace", "-3")
|
||||||
pfUI:UpdateConfig("unitframes", "focus", "buffs", "top")
|
pfUI:UpdateConfig("unitframes", "focus", "buffs", "TOPLEFT")
|
||||||
pfUI:UpdateConfig("unitframes", "focus", "buffsize", "12")
|
pfUI:UpdateConfig("unitframes", "focus", "buffsize", "12")
|
||||||
pfUI:UpdateConfig("unitframes", "focus", "bufflimit", "32")
|
pfUI:UpdateConfig("unitframes", "focus", "bufflimit", "32")
|
||||||
pfUI:UpdateConfig("unitframes", "focus", "buffperrow", "8")
|
pfUI:UpdateConfig("unitframes", "focus", "buffperrow", "8")
|
||||||
pfUI:UpdateConfig("unitframes", "focus", "debuffs", "top")
|
pfUI:UpdateConfig("unitframes", "focus", "debuffs", "TOPLEFT")
|
||||||
pfUI:UpdateConfig("unitframes", "focus", "debuffsize", "12")
|
pfUI:UpdateConfig("unitframes", "focus", "debuffsize", "12")
|
||||||
pfUI:UpdateConfig("unitframes", "focus", "debufflimit", "32")
|
pfUI:UpdateConfig("unitframes", "focus", "debufflimit", "32")
|
||||||
pfUI:UpdateConfig("unitframes", "focus", "debuffperrow", "8")
|
pfUI:UpdateConfig("unitframes", "focus", "debuffperrow", "8")
|
||||||
@@ -333,11 +333,11 @@ function pfUI:LoadConfig()
|
|||||||
pfUI:UpdateConfig("unitframes", "group", "pwidth", "-1")
|
pfUI:UpdateConfig("unitframes", "group", "pwidth", "-1")
|
||||||
pfUI:UpdateConfig("unitframes", "group", "panchor", "TOP")
|
pfUI:UpdateConfig("unitframes", "group", "panchor", "TOP")
|
||||||
pfUI:UpdateConfig("unitframes", "group", "pspace", "-3")
|
pfUI:UpdateConfig("unitframes", "group", "pspace", "-3")
|
||||||
pfUI:UpdateConfig("unitframes", "group", "buffs", "bottom")
|
pfUI:UpdateConfig("unitframes", "group", "buffs", "BOTTOMLEFT")
|
||||||
pfUI:UpdateConfig("unitframes", "group", "buffsize", "8")
|
pfUI:UpdateConfig("unitframes", "group", "buffsize", "8")
|
||||||
pfUI:UpdateConfig("unitframes", "group", "bufflimit", "16")
|
pfUI:UpdateConfig("unitframes", "group", "bufflimit", "16")
|
||||||
pfUI:UpdateConfig("unitframes", "group", "buffperrow", "8")
|
pfUI:UpdateConfig("unitframes", "group", "buffperrow", "8")
|
||||||
pfUI:UpdateConfig("unitframes", "group", "debuffs", "bottom")
|
pfUI:UpdateConfig("unitframes", "group", "debuffs", "BOTTOMLEFT")
|
||||||
pfUI:UpdateConfig("unitframes", "group", "debuffsize", "8")
|
pfUI:UpdateConfig("unitframes", "group", "debuffsize", "8")
|
||||||
pfUI:UpdateConfig("unitframes", "group", "debufflimit", "8")
|
pfUI:UpdateConfig("unitframes", "group", "debufflimit", "8")
|
||||||
pfUI:UpdateConfig("unitframes", "group", "debuffperrow", "8")
|
pfUI:UpdateConfig("unitframes", "group", "debuffperrow", "8")
|
||||||
@@ -549,11 +549,11 @@ function pfUI:LoadConfig()
|
|||||||
pfUI:UpdateConfig("unitframes", "pet", "pwidth", "-1")
|
pfUI:UpdateConfig("unitframes", "pet", "pwidth", "-1")
|
||||||
pfUI:UpdateConfig("unitframes", "pet", "panchor", "TOP")
|
pfUI:UpdateConfig("unitframes", "pet", "panchor", "TOP")
|
||||||
pfUI:UpdateConfig("unitframes", "pet", "pspace", "-3")
|
pfUI:UpdateConfig("unitframes", "pet", "pspace", "-3")
|
||||||
pfUI:UpdateConfig("unitframes", "pet", "buffs", "top")
|
pfUI:UpdateConfig("unitframes", "pet", "buffs", "TOPLEFT")
|
||||||
pfUI:UpdateConfig("unitframes", "pet", "buffsize", "12")
|
pfUI:UpdateConfig("unitframes", "pet", "buffsize", "12")
|
||||||
pfUI:UpdateConfig("unitframes", "pet", "bufflimit", "16")
|
pfUI:UpdateConfig("unitframes", "pet", "bufflimit", "16")
|
||||||
pfUI:UpdateConfig("unitframes", "pet", "buffperrow", "8")
|
pfUI:UpdateConfig("unitframes", "pet", "buffperrow", "8")
|
||||||
pfUI:UpdateConfig("unitframes", "pet", "debuffs", "top")
|
pfUI:UpdateConfig("unitframes", "pet", "debuffs", "TOPLEFT")
|
||||||
pfUI:UpdateConfig("unitframes", "pet", "debuffsize", "12")
|
pfUI:UpdateConfig("unitframes", "pet", "debuffsize", "12")
|
||||||
pfUI:UpdateConfig("unitframes", "pet", "debufflimit", "16")
|
pfUI:UpdateConfig("unitframes", "pet", "debufflimit", "16")
|
||||||
pfUI:UpdateConfig("unitframes", "pet", "debuffperrow", "8")
|
pfUI:UpdateConfig("unitframes", "pet", "debuffperrow", "8")
|
||||||
@@ -635,11 +635,11 @@ function pfUI:LoadConfig()
|
|||||||
pfUI:UpdateConfig("unitframes", "fallback", "pwidth", "-1")
|
pfUI:UpdateConfig("unitframes", "fallback", "pwidth", "-1")
|
||||||
pfUI:UpdateConfig("unitframes", "fallback", "panchor", "TOP")
|
pfUI:UpdateConfig("unitframes", "fallback", "panchor", "TOP")
|
||||||
pfUI:UpdateConfig("unitframes", "fallback", "pspace", "-3")
|
pfUI:UpdateConfig("unitframes", "fallback", "pspace", "-3")
|
||||||
pfUI:UpdateConfig("unitframes", "fallback", "buffs", "top")
|
pfUI:UpdateConfig("unitframes", "fallback", "buffs", "TOPLEFT")
|
||||||
pfUI:UpdateConfig("unitframes", "fallback", "buffsize", "20")
|
pfUI:UpdateConfig("unitframes", "fallback", "buffsize", "20")
|
||||||
pfUI:UpdateConfig("unitframes", "fallback", "bufflimit", "16")
|
pfUI:UpdateConfig("unitframes", "fallback", "bufflimit", "16")
|
||||||
pfUI:UpdateConfig("unitframes", "fallback", "buffperrow", "8")
|
pfUI:UpdateConfig("unitframes", "fallback", "buffperrow", "8")
|
||||||
pfUI:UpdateConfig("unitframes", "fallback", "debuffs", "top")
|
pfUI:UpdateConfig("unitframes", "fallback", "debuffs", "TOPLEFT")
|
||||||
pfUI:UpdateConfig("unitframes", "fallback", "debuffsize", "20")
|
pfUI:UpdateConfig("unitframes", "fallback", "debuffsize", "20")
|
||||||
pfUI:UpdateConfig("unitframes", "fallback", "debufflimit", "16")
|
pfUI:UpdateConfig("unitframes", "fallback", "debufflimit", "16")
|
||||||
pfUI:UpdateConfig("unitframes", "fallback", "debuffperrow", "8")
|
pfUI:UpdateConfig("unitframes", "fallback", "debuffperrow", "8")
|
||||||
@@ -1015,7 +1015,18 @@ function pfUI:MigrateConfig()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
pfUI:UpdateConfig("buffbar", "tdebuff", "color", ".5,.1,.1,1")
|
-- migrating default debuffbar color settings (> 3.17)
|
||||||
|
if checkversion(3, 17, 0) then
|
||||||
|
local unitframes = { "player", "target", "focus", "group", "grouptarget", "grouppet", "raid", "ttarget", "pet", "ptarget", "fallback" }
|
||||||
|
|
||||||
|
for _, unitframe in pairs(unitframes) do
|
||||||
|
local entry = pfUI_config.unitframes[unitframe]
|
||||||
|
if entry.buffs and entry.buffs == "top" then entry.buffs = "TOPLEFT" end
|
||||||
|
if entry.buffs and entry.buffs == "bottom" then entry.buffs = "BOTTOMLEFT" end
|
||||||
|
if entry.debuffs and entry.debuffs == "top" then entry.debuffs = "TOPLEFT" end
|
||||||
|
if entry.debuffs and entry.debuffs == "bottom" then entry.debuffs = "BOTTOMLEFT" end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
pfUI_config.version = pfUI.version.string
|
pfUI_config.version = pfUI.version.string
|
||||||
end
|
end
|
||||||
|
|||||||
+36
-20
@@ -389,20 +389,28 @@ function pfUI.uf:UpdateConfig()
|
|||||||
f.buffs[i]:RegisterForClicks("RightButtonUp")
|
f.buffs[i]:RegisterForClicks("RightButtonUp")
|
||||||
f.buffs[i]:ClearAllPoints()
|
f.buffs[i]:ClearAllPoints()
|
||||||
|
|
||||||
local invert, af, as
|
local invert_h, invert_v, af
|
||||||
if f.config.buffs == "top" then
|
if f.config.buffs == "TOPLEFT" then
|
||||||
invert = 1
|
invert_h = 1
|
||||||
|
invert_v = 1
|
||||||
af = "BOTTOMLEFT"
|
af = "BOTTOMLEFT"
|
||||||
as = "TOPLEFT"
|
elseif f.config.buffs == "BOTTOMLEFT" then
|
||||||
elseif f.config.buffs == "bottom" then
|
invert_h = -1
|
||||||
invert = -1
|
invert_v = 1
|
||||||
af = "TOPLEFT"
|
af = "TOPLEFT"
|
||||||
as = "BOTTOMLEFT"
|
elseif f.config.buffs == "TOPRIGHT" then
|
||||||
|
invert_h = 1
|
||||||
|
invert_v = -1
|
||||||
|
af = "BOTTOMRIGHT"
|
||||||
|
elseif f.config.buffs == "BOTTOMRIGHT" then
|
||||||
|
invert_h = -1
|
||||||
|
invert_v = -1
|
||||||
|
af = "TOPRIGHT"
|
||||||
end
|
end
|
||||||
|
|
||||||
f.buffs[i]:SetPoint(af, f, as,
|
f.buffs[i]:SetPoint(af, f, f.config.buffs,
|
||||||
(i-1-row*perrow)*((2*default_border) + f.config.buffsize + 1),
|
invert_v * (i-1-row*perrow)*(2*default_border + f.config.buffsize + 1),
|
||||||
invert * (row)*((2*default_border) + f.config.buffsize + 1) + invert*(2*default_border + 1))
|
invert_h * (row*(2*default_border + f.config.buffsize + 1) + (2*default_border + 1)))
|
||||||
|
|
||||||
f.buffs[i]:SetWidth(f.config.buffsize)
|
f.buffs[i]:SetWidth(f.config.buffsize)
|
||||||
f.buffs[i]:SetHeight(f.config.buffsize)
|
f.buffs[i]:SetHeight(f.config.buffsize)
|
||||||
@@ -1125,20 +1133,28 @@ function pfUI.uf:RefreshUnit(unit, component)
|
|||||||
if unit.buffs[3*bperrow+1] and unit.buffs[3*bperrow+1]:IsShown() then buffrow = buffrow + 1 end
|
if unit.buffs[3*bperrow+1] and unit.buffs[3*bperrow+1]:IsShown() then buffrow = buffrow + 1 end
|
||||||
end
|
end
|
||||||
|
|
||||||
local invert, af, as
|
local invert_h, invert_v, af
|
||||||
if unit.config.debuffs == "top" then
|
if unit.config.debuffs == "TOPLEFT" then
|
||||||
invert = 1
|
invert_h = 1
|
||||||
|
invert_v = 1
|
||||||
af = "BOTTOMLEFT"
|
af = "BOTTOMLEFT"
|
||||||
as = "TOPLEFT"
|
elseif unit.config.debuffs == "BOTTOMLEFT" then
|
||||||
elseif unit.config.debuffs == "bottom" then
|
invert_h = -1
|
||||||
invert = -1
|
invert_v = 1
|
||||||
af = "TOPLEFT"
|
af = "TOPLEFT"
|
||||||
as = "BOTTOMLEFT"
|
elseif unit.config.debuffs == "TOPRIGHT" then
|
||||||
|
invert_h = 1
|
||||||
|
invert_v = -1
|
||||||
|
af = "BOTTOMRIGHT"
|
||||||
|
elseif unit.config.debuffs == "BOTTOMRIGHT" then
|
||||||
|
invert_h = -1
|
||||||
|
invert_v = -1
|
||||||
|
af = "TOPRIGHT"
|
||||||
end
|
end
|
||||||
|
|
||||||
unit.debuffs[i]:SetPoint(af, unit, as,
|
unit.debuffs[i]:SetPoint(af, unit, unit.config.debuffs,
|
||||||
(i-1-(row)*perrow)*((2*default_border) + unit.config.debuffsize + 1),
|
invert_v * (i-1-row*perrow)*(2*default_border + unit.config.debuffsize + 1),
|
||||||
invert * (row+buffrow)*((2*default_border) + unit.config.debuffsize + 1) + invert*(2*default_border + 1))
|
invert_h * ((row+buffrow)*(2*default_border + unit.config.debuffsize + 1) + (2*default_border + 1)))
|
||||||
|
|
||||||
local texture, stacks, dtype
|
local texture, stacks, dtype
|
||||||
if unit.label == "player" then
|
if unit.label == "player" then
|
||||||
|
|||||||
+4
-2
@@ -602,8 +602,10 @@ pfUI:RegisterModule("gui", function ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
pfUI.gui.dropdowns.uf_buff_position = {
|
pfUI.gui.dropdowns.uf_buff_position = {
|
||||||
"top:" .. T["Top"],
|
"TOPLEFT:" .. T["Top Left"],
|
||||||
"bottom:" .. T["Bottom"],
|
"TOPRIGHT:" .. T["Top Right"],
|
||||||
|
"BOTTOMLEFT:" .. T["Bottom Left"],
|
||||||
|
"BOTTOMRIGHT:" .. T["Bottom Right"],
|
||||||
"off:" .. T["Disabled"]
|
"off:" .. T["Disabled"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
## Title: |cff33ffccpf|cffffffffUI
|
## Title: |cff33ffccpf|cffffffffUI
|
||||||
## Author: Shagu
|
## Author: Shagu
|
||||||
## Notes: A complete user interface replacement.
|
## Notes: A complete user interface replacement.
|
||||||
## Version: 3.17
|
## Version: 3.18
|
||||||
## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache
|
## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache
|
||||||
## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB
|
## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user