mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-05 05:00:02 +00:00
unitframes: add option to show self in group
This commit is contained in:
+7
-4
@@ -19,10 +19,12 @@ pfUI:RegisterModule("group", function ()
|
||||
|
||||
pfUI.uf.group = {}
|
||||
|
||||
for i=1, 4 do
|
||||
local startid = C.unitframes.selfingroup == "1" and 0 or 1
|
||||
|
||||
for i=startid, 4 do
|
||||
pfUI.uf.group[i] = pfUI.uf:CreateUnitFrame("Party", i, C.unitframes.group)
|
||||
pfUI.uf.group[i]:UpdateFrameSize()
|
||||
pfUI.uf.group[i]:SetPoint("TOPLEFT", 5, -5 - ((i-1)*75))
|
||||
pfUI.uf.group[i]:SetPoint("TOPLEFT", 5, -5 - ((i-startid)*75))
|
||||
UpdateMovable(pfUI.uf.group[i])
|
||||
|
||||
pfUI.uf.group[i].target = pfUI.uf:CreateUnitFrame("Party" .. i .. "Target", nil, C.unitframes.grouptarget, 0.2)
|
||||
@@ -37,8 +39,9 @@ pfUI:RegisterModule("group", function ()
|
||||
UpdateMovable(pfUI.uf.group[i].pet)
|
||||
end
|
||||
|
||||
pfUI.uf.partytargetScanner = CreateFrame("Button",nil,UIParent)
|
||||
pfUI.uf.partytargetScanner:SetScript("OnUpdate", function()
|
||||
pfUI.uf.groupscanner = CreateFrame("Frame", nil, UIParent)
|
||||
pfUI.uf.groupscanner:SetScript("OnUpdate", function()
|
||||
if ( this.limit or 1) > GetTime() then return else this.limit = GetTime() + .2 end
|
||||
for i=1, 4 do
|
||||
if UnitExists("party" .. i .. "target") or (pfUI.unlock and pfUI.unlock:IsShown()) then
|
||||
pfUI.uf.group[i].target:Show()
|
||||
|
||||
@@ -1119,6 +1119,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui.tabs.gf.tabs.general = pfUI.gui.tabs.gf.tabs:CreateChildFrame(T["General"], 70)
|
||||
pfUI.gui.tabs.gf.tabs.general:SetScript("OnShow", function()
|
||||
if not this.setup then
|
||||
CreateConfig(this, T["Show Self as Group Member"], C.unitframes, "selfingroup", "checkbox")
|
||||
CreateConfig(this, T["Show Hots as Buff Indicators"], C.unitframes, "show_hots", "checkbox")
|
||||
CreateConfig(this, T["Show Hots of all Classes"], C.unitframes, "all_hots", "checkbox")
|
||||
CreateConfig(this, T["Show Procs as Buff Indicators"], C.unitframes, "show_procs", "checkbox")
|
||||
|
||||
Reference in New Issue
Block a user