Let each cooldown frame apply its own sweep settings

The sweep options reached the frames only through the cooldown module's
CooldownFrame_SetTimer hook, which set alpha 0 for a hidden animation and
SetReverse(true) for a reversed one. With that module disabled, Show Timer
Animation and Reverse did nothing, and reverse never turned back off
without a reload. The player buff sweeps had no other path at all.

Each owner now configures its own frame. Player buffs drive their
Cooldown with SetCooldown and Clear, and only while Show Timer Animation
is on. Unit frame auras, raid aura indicators and nameplate debuffs hide
the sweep with SetDrawSwipe and SetDrawBling. Every frame with a reverse
option calls SetReverse. The hook keeps the timer text and Hide Foreign
Cooldown Animations.

Nameplate debuffs hid the sweep with alpha, which the plate's SetAlpha
copied down on every target change (ClassicAPI keeps 1.12's alpha under
default plates), so hidden sweeps came back. Their settings now come from
UpdateDebuffConfig alone.

Bag slots get a native Cooldown like bank slots, in place of the
template's indicator Model, so Reverse Cooldown Animation covers bags and
Hide Foreign Cooldown Animations no longer hides them.

The buff, unit frame, nameplate and totem options apply without a reload.

Fixes #72.
This commit is contained in:
Brues
2026-10-30 10:46:00 -05:00
parent f33a9068f2
commit a721f788a9
8 changed files with 49 additions and 76 deletions
+9 -5
View File
@@ -500,7 +500,7 @@ function pfUI.uf:UpdateConfig()
local cooldown_text = tonumber(f.config.cooldown_text) local cooldown_text = tonumber(f.config.cooldown_text)
local cooldown_anim = tonumber(f.config.cooldown_anim) local cooldown_anim = tonumber(f.config.cooldown_anim)
local cooldown_reverse = tonumber(f.config.cooldown_reverse) or 0 local cooldown_reverse = f.config.cooldown_reverse == "1"
local relative_point = "BOTTOM" local relative_point = "BOTTOM"
if f.config.panchor == "TOPLEFT" then if f.config.panchor == "TOPLEFT" then
@@ -862,8 +862,9 @@ function pfUI.uf:UpdateConfig()
f.buffs[i].cd.pfCooldownType = "ALL" f.buffs[i].cd.pfCooldownType = "ALL"
f.buffs[i].cd.pfCooldownStyleText = cooldown_text f.buffs[i].cd.pfCooldownStyleText = cooldown_text
f.buffs[i].cd.pfCooldownStyleAnimation = cooldown_anim f.buffs[i].cd.pfCooldownStyleAnimation = cooldown_anim
f.buffs[i].cd.pfCooldownReverse = cooldown_reverse f.buffs[i].cd:SetDrawSwipe(cooldown_anim == 1)
f.buffs[i].cd:SetAlpha(cooldown_anim == 1 and 1 or 0) f.buffs[i].cd:SetDrawBling(cooldown_anim == 1)
f.buffs[i].cd:SetReverse(cooldown_reverse)
-- immediately show/hide existing cooldown text -- immediately show/hide existing cooldown text
if f.buffs[i].cd.pfCooldownText then if f.buffs[i].cd.pfCooldownText then
@@ -923,8 +924,9 @@ function pfUI.uf:UpdateConfig()
f.debuffs[i].cd.pfCooldownType = "ALL" f.debuffs[i].cd.pfCooldownType = "ALL"
f.debuffs[i].cd.pfCooldownStyleText = cooldown_text f.debuffs[i].cd.pfCooldownStyleText = cooldown_text
f.debuffs[i].cd.pfCooldownStyleAnimation = cooldown_anim f.debuffs[i].cd.pfCooldownStyleAnimation = cooldown_anim
f.debuffs[i].cd.pfCooldownReverse = cooldown_reverse f.debuffs[i].cd:SetDrawSwipe(cooldown_anim == 1)
f.debuffs[i].cd:SetAlpha(cooldown_anim == 1 and 1 or 0) f.debuffs[i].cd:SetDrawBling(cooldown_anim == 1)
f.debuffs[i].cd:SetReverse(cooldown_reverse)
-- immediately show/hide existing cooldown text -- immediately show/hide existing cooldown text
if f.debuffs[i].cd.pfCooldownText then if f.debuffs[i].cd.pfCooldownText then
@@ -2269,6 +2271,8 @@ function pfUI.uf:AddIcon(frame, pos, icon, timeleft, stacks, start, duration)
frame.icon[pos].cd = CreateFrame("Cooldown", nil, frame.icon[pos], "CooldownFrameTemplate") frame.icon[pos].cd = CreateFrame("Cooldown", nil, frame.icon[pos], "CooldownFrameTemplate")
frame.icon[pos].cd.pfCooldownStyleAnimation = 0 frame.icon[pos].cd.pfCooldownStyleAnimation = 0
frame.icon[pos].cd:SetDrawSwipe(false)
frame.icon[pos].cd:SetDrawBling(false)
frame.icon[pos].cd.pfCooldownType = "ALL" frame.icon[pos].cd.pfCooldownType = "ALL"
frame.icon[pos].cd:SetFrameLevel(48) frame.icon[pos].cd:SetFrameLevel(48)
end end
+1 -1
View File
@@ -1035,7 +1035,7 @@ pfUI:RegisterModule("actionbar", function ()
-- cooldown -- cooldown
f.cd = CreateFrame("Cooldown", f:GetName() .. "Cooldown", f, "CooldownFrameTemplate") f.cd = CreateFrame("Cooldown", f:GetName() .. "Cooldown", f, "CooldownFrameTemplate")
f.cd.pfCooldownStyleAnimation = 1 f.cd.pfCooldownStyleAnimation = 1
f.cd.pfCooldownReverse = tonumber(C.bars.cooldown_reverse) or 0 f.cd:SetReverse(C.bars.cooldown_reverse == "1")
f.cd.pfCooldownType = "NOGCD" f.cd.pfCooldownType = "NOGCD"
f.cd.pfCooldownSize = cd_size f.cd.pfCooldownSize = cd_size
+9 -14
View File
@@ -415,20 +415,15 @@ pfUI:RegisterModule("bags", function ()
pfUI.bags[bag].slots[slot].slot = slot pfUI.bags[bag].slots[slot].slot = slot
pfUI.bags[bag].slots[slot].frame:SetID(slot) pfUI.bags[bag].slots[slot].frame:SetID(slot)
-- add cooldown frame to bankslots -- native cooldown frame: the bank template has none and the bag
if tpl == "BankItemButtonGenericTemplate" then -- template's is 1.12's indicator Model, which can't reverse. Taking the
local bankslot = pfUI.bags[bag].slots[slot].frame -- "<button>Cooldown" name points ContainerFrame_UpdateCooldown at it;
local name = "pfBag" .. bag .. "item" .. slot .. "Cooldown" -- the Model starts hidden and nothing reaches it after that
bankslot.cd = CreateFrame("Cooldown", name, bankslot, "CooldownFrameTemplate") local slotframe = pfUI.bags[bag].slots[slot].frame
bankslot.cd.pfCooldownStyleAnimation = 1 slotframe.cd = CreateFrame("Cooldown", slotframe:GetName() .. "Cooldown", slotframe, "CooldownFrameTemplate")
bankslot.cd.pfCooldownReverse = tonumber(C.appearance.bags.cooldown_reverse) or 0 slotframe.cd.pfCooldownStyleAnimation = 1
bankslot.cd.pfCooldownType = "NOGCD" slotframe.cd:SetReverse(C.appearance.bags.cooldown_reverse == "1")
else slotframe.cd.pfCooldownType = "NOGCD"
local bagslot = pfUI.bags[bag].slots[slot].frame
bagslot.cd = _G[bagslot:GetName().."Cooldown"]
bagslot.cd.pfCooldownType = "NOGCD"
bagslot.cd.pfCooldownReverse = tonumber(C.appearance.bags.cooldown_reverse) or 0
end
if not pfUI.bags[bag].slots[slot].frame.backdrop then if not pfUI.bags[bag].slots[slot].frame.backdrop then
CreateBackdrop(pfUI.bags[bag].slots[slot].frame, default_border) CreateBackdrop(pfUI.bags[bag].slots[slot].frame, default_border)
+9 -12
View File
@@ -86,23 +86,23 @@ pfUI:RegisterModule("buff", function ()
-- drive the sweep from the aura duration (weapon enchants and permanent -- drive the sweep from the aura duration (weapon enchants and permanent
-- auras report no usable total, so those buttons stay text-only) -- auras report no usable total, so those buttons stay text-only)
if buff.mode == buff.btype and duration and duration > 0 and expirationTime and expirationTime > 0 then if C.buffs.cooldown_anim == "1" and buff.mode == buff.btype and duration and duration > 0 and expirationTime and expirationTime > 0 then
local now = GetTime() local now = GetTime()
local timeleft = expirationTime - now local timeleft = expirationTime - now
if timeleft > 0 then if timeleft > 0 then
local effDuration = duration > timeleft and duration or timeleft local effDuration = duration > timeleft and duration or timeleft
local newStart = now + timeleft - effDuration local newStart = now + timeleft - effDuration
if buff.cdStart == nil or abs(buff.cdStart - newStart) > .5 or buff.cdDuration ~= effDuration then if buff.cdStart == nil or abs(buff.cdStart - newStart) > .5 or buff.cdDuration ~= effDuration then
CooldownFrame_SetTimer(buff.cd, newStart, effDuration, 1) buff.cd:SetCooldown(newStart, effDuration)
buff.cdStart = newStart buff.cdStart = newStart
buff.cdDuration = effDuration buff.cdDuration = effDuration
end end
else else
CooldownFrame_SetTimer(buff.cd, 0, 0, 0) buff.cd:Clear()
buff.cdStart = nil buff.cdStart = nil
end end
else else
CooldownFrame_SetTimer(buff.cd, 0, 0, 0) buff.cd:Clear()
buff.cdStart = nil buff.cdStart = nil
end end
@@ -145,15 +145,13 @@ pfUI:RegisterModule("buff", function ()
buff.stacks:SetJustifyV("BOTTOM") buff.stacks:SetJustifyV("BOTTOM")
buff.stacks:SetAllPoints(buff) buff.stacks:SetAllPoints(buff)
-- radial sweep (the template covers the button and starts hidden; -- radial sweep (the template covers the button and starts hidden).
-- the cooldown hook drives it from here, text stays with buff.timer) -- RefreshBuffButton drives it through the frame's own methods, never
-- CooldownFrame_SetTimer, so the cooldown module's hook leaves it alone;
-- text stays with buff.timer
buff.cd = CreateFrame("Cooldown", buttonName .. "Cooldown", buff, "CooldownFrameTemplate") buff.cd = CreateFrame("Cooldown", buttonName .. "Cooldown", buff, "CooldownFrameTemplate")
buff.cd:SetFrameLevel(buff:GetFrameLevel() + 1) buff.cd:SetFrameLevel(buff:GetFrameLevel() + 1)
buff.overlay:SetFrameLevel(buff:GetFrameLevel() + 2) buff.overlay:SetFrameLevel(buff:GetFrameLevel() + 2)
buff.cd.pfCooldownType = "ALL"
buff.cd.pfCooldownStyleText = 0
buff.cd.pfCooldownStyleAnimation = tonumber(C.buffs.cooldown_anim) or 0
buff.cd.pfCooldownReverse = tonumber(C.buffs.cooldown_reverse) or 0
buff:RegisterForClicks("RightButtonUp") buff:RegisterForClicks("RightButtonUp")
@@ -345,8 +343,7 @@ pfUI:RegisterModule("buff", function ()
offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+buffSize+2*buffSpacing) offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+buffSize+2*buffSpacing)
end end
buff:SetSize(buffSize, buffSize) buff:SetSize(buffSize, buffSize)
buff.cd.pfCooldownStyleAnimation = tonumber(C.buffs.cooldown_anim) or 0 buff.cd:SetReverse(C.buffs.cooldown_reverse == "1")
buff.cd.pfCooldownReverse = tonumber(C.buffs.cooldown_reverse) or 0
buff:ClearAllPoints() buff:ClearAllPoints()
buff:SetPoint("TOPRIGHT", relFrame, "TOPRIGHT",offsetX, offsetY) buff:SetPoint("TOPRIGHT", relFrame, "TOPRIGHT",offsetX, offsetY)
+3 -10
View File
@@ -135,17 +135,10 @@ pfUI:RegisterModule("cooldown", function ()
start, duration = 0, 0 start, duration = 0, 0
end end
-- hide animation -- hide foreign animations; frames that set pfCooldownStyleAnimation
if this.pfCooldownStyleAnimation == 0 then -- configure their own sweep (SetDrawSwipe, SetReverse)
if not this.pfCooldownStyleAnimation and C.appearance.cd.hideanim == "1" then
this:SetAlpha(0) this:SetAlpha(0)
elseif not this.pfCooldownStyleAnimation and C.appearance.cd.hideanim == "1" then
this:SetAlpha(0)
end
-- reversed sweep direction (ClassicAPI backports SetReverse with the
-- modern Cooldown frame; stock Model swipes don't have it, so guard it)
if this.pfCooldownReverse == 1 and this.SetReverse then
this:SetReverse(true)
end end
-- print time as text on cooldown frames -- print time as text on cooldown frames
+7 -7
View File
@@ -2337,8 +2337,8 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U[c], T["Timer"], nil, nil, "header") CreateConfig(U[c], T["Timer"], nil, nil, "header")
CreateConfig(U[c], T["Show Timer Text"], C.unitframes[c], "cooldown_text", "checkbox") CreateConfig(U[c], T["Show Timer Text"], C.unitframes[c], "cooldown_text", "checkbox")
CreateConfig(Reload, T["Show Timer Animation"], C.unitframes[c], "cooldown_anim", "checkbox") CreateConfig(U[c], T["Show Timer Animation"], C.unitframes[c], "cooldown_anim", "checkbox")
CreateConfig(Reload, T["Reverse Timer Animation"], C.unitframes[c], "cooldown_reverse", "checkbox") CreateConfig(U[c], T["Reverse Timer Animation"], C.unitframes[c], "cooldown_reverse", "checkbox")
CreateConfig(U[c], T["Buffs"], nil, nil, "header") CreateConfig(U[c], T["Buffs"], nil, nil, "header")
CreateConfig(U[c], T["Buff Position"], C.unitframes[c], "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) CreateConfig(U[c], T["Buff Position"], C.unitframes[c], "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position)
@@ -2508,8 +2508,8 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U["buff"], T["Number Of Debuffs Per Row"], C.buffs, "debuffrowsize") CreateConfig(U["buff"], T["Number Of Debuffs Per Row"], C.buffs, "debuffrowsize")
CreateConfig(U["buff"], T["Show Duration Inside Buff"], C.buffs, "textinside", "checkbox") CreateConfig(U["buff"], T["Show Duration Inside Buff"], C.buffs, "textinside", "checkbox")
CreateConfig(U["buff"], T["Buff Font Size"], C.buffs, "fontsize") CreateConfig(U["buff"], T["Buff Font Size"], C.buffs, "fontsize")
CreateConfig(Reload, T["Show Timer Animation"], C.buffs, "cooldown_anim", "checkbox") CreateConfig(U["buff"], T["Show Timer Animation"], C.buffs, "cooldown_anim", "checkbox")
CreateConfig(Reload, T["Reverse Timer Animation"], C.buffs, "cooldown_reverse", "checkbox") CreateConfig(U["buff"], T["Reverse Timer Animation"], C.buffs, "cooldown_reverse", "checkbox")
end) end)
CreateGUIEntry(T["Buffs"], T["Totem Icons"], function() CreateGUIEntry(T["Buffs"], T["Totem Icons"], function()
@@ -2517,7 +2517,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U["totems"], T["Icon Size"], C.totems, "iconsize") CreateConfig(U["totems"], T["Icon Size"], C.totems, "iconsize")
CreateConfig(U["totems"], T["Spacing"], C.totems, "spacing", "dropdown", pfUI.gui.dropdowns.spacing) CreateConfig(U["totems"], T["Spacing"], C.totems, "spacing", "dropdown", pfUI.gui.dropdowns.spacing)
CreateConfig(U["totems"], T["Show Background"], C.totems, "showbg", "checkbox") CreateConfig(U["totems"], T["Show Background"], C.totems, "showbg", "checkbox")
CreateConfig(Reload, T["Reverse Cooldown Animation"], C.totems, "cooldown_reverse", "checkbox") CreateConfig(U["totems"], T["Reverse Cooldown Animation"], C.totems, "cooldown_reverse", "checkbox")
end) end)
CreateGUIEntry(T["Buffs"], T["Player Buff Bar"], function() CreateGUIEntry(T["Buffs"], T["Player Buff Bar"], function()
@@ -2978,8 +2978,8 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U["nameplates"], T["Show Debuff Stacks"], C.nameplates.debuffs, "showstacks", "checkbox") CreateConfig(U["nameplates"], T["Show Debuff Stacks"], C.nameplates.debuffs, "showstacks", "checkbox")
CreateConfig(U["nameplates"], T["Enable Debuff Timers"], C.nameplates, "debufftimers", "checkbox") CreateConfig(U["nameplates"], T["Enable Debuff Timers"], C.nameplates, "debufftimers", "checkbox")
CreateConfig(U["nameplates"], T["Show Timer Text"], C.nameplates, "debufftext", "checkbox") CreateConfig(U["nameplates"], T["Show Timer Text"], C.nameplates, "debufftext", "checkbox")
CreateConfig(Reload, T["Show Timer Animation"], C.nameplates, "debuffanim", "checkbox") CreateConfig(U["nameplates"], T["Show Timer Animation"], C.nameplates, "debuffanim", "checkbox")
CreateConfig(Reload, T["Reverse Timer Animation"], C.nameplates, "debreverse", "checkbox") CreateConfig(U["nameplates"], T["Reverse Timer Animation"], C.nameplates, "debreverse", "checkbox")
CreateConfig(U["nameplates"], T["Filter Mode"], C.nameplates.debuffs, "filter", "dropdown", pfUI.gui.dropdowns.buffbarfilter) CreateConfig(U["nameplates"], T["Filter Mode"], C.nameplates.debuffs, "filter", "dropdown", pfUI.gui.dropdowns.buffbarfilter)
CreateConfig(U["nameplates"], T["Blacklist"], C.nameplates.debuffs, "blacklist", "list") CreateConfig(U["nameplates"], T["Blacklist"], C.nameplates.debuffs, "blacklist", "list")
+10 -26
View File
@@ -157,9 +157,6 @@ pfUI:RegisterModule("nameplates", function ()
cfg.hptextformat = C.nameplates.hptextformat cfg.hptextformat = C.nameplates.hptextformat
-- NEW: Cache debuff config -- NEW: Cache debuff config
cfg.debufftimers = C.nameplates.debufftimers == "1" cfg.debufftimers = C.nameplates.debufftimers == "1"
cfg.debuffanim = tonumber(C.nameplates.debuffanim) or 0
cfg.debufftext = tonumber(C.nameplates.debufftext) or 1
cfg.debreverse = tonumber(C.nameplates.debreverse) or 0
-- Throttle delays, resolved once instead of per plate per tick. -- Throttle delays, resolved once instead of per plate per tick.
-- libthrottle:Get walks the saved-variable table, a defaults fallback and a -- libthrottle:Get walks the saved-variable table, a defaults fallback and a
@@ -443,11 +440,8 @@ pfUI:RegisterModule("nameplates", function ()
plate.debuffs[index].cd = CreateFrame("Cooldown", plate.platename.."Debuff"..index.."Cooldown", plate.debuffs[index], "CooldownFrameTemplate") plate.debuffs[index].cd = CreateFrame("Cooldown", plate.platename.."Debuff"..index.."Cooldown", plate.debuffs[index], "CooldownFrameTemplate")
plate.debuffs[index].cd:SetFrameLevel(6) plate.debuffs[index].cd:SetFrameLevel(6)
-- the display settings come from UpdateDebuffConfig, which runs for
-- Set initial config flags (will be cached per-cooldown later) -- every new icon before its first timer
plate.debuffs[index].cd.pfCooldownStyleAnimation = cfg.debuffanim
plate.debuffs[index].cd.pfCooldownReverse = cfg.debreverse or 0
plate.debuffs[index].cd.pfCooldownStyleText = cfg.debufftext
plate.debuffs[index].cd.pfCooldownType = "ALL" plate.debuffs[index].cd.pfCooldownType = "ALL"
end end
@@ -483,14 +477,14 @@ pfUI:RegisterModule("nameplates", function ()
nameplate.debuffs[i]:SetSize(debuffsize, debuffsize) nameplate.debuffs[i]:SetSize(debuffsize, debuffsize)
-- Update cooldown display settings -- Update cooldown display settings
if nameplate.debuffs[i].cd then local cd = nameplate.debuffs[i].cd
local cooldown_text = tonumber(C.nameplates.debufftext) or 1 cd.pfCooldownStyleText = tonumber(C.nameplates.debufftext) or 1
local cooldown_anim = tonumber(C.nameplates.debuffanim) or 0 cd.pfCooldownStyleAnimation = tonumber(C.nameplates.debuffanim) or 0
nameplate.debuffs[i].cd.pfCooldownStyleText = cooldown_text -- the draw flags, not alpha: the plate's SetAlpha copies its alpha down
nameplate.debuffs[i].cd.pfCooldownStyleAnimation = cooldown_anim -- to every child (ClassicAPI keeps 1.12's alpha under default plates)
nameplate.debuffs[i].cd.pfCooldownReverse = tonumber(C.nameplates.debreverse) or 0 cd:SetDrawSwipe(C.nameplates.debuffanim == "1")
cd:SetDrawBling(C.nameplates.debuffanim == "1")
end cd:SetReverse(C.nameplates.debreverse == "1")
end end
-- create nameplate core -- create nameplate core
@@ -1399,16 +1393,6 @@ nameplates:RegisterUnitEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "target", "focu
local cd = plate.debuffs[index].cd local cd = plate.debuffs[index].cd
cd:Show() cd:Show()
if not cachedStart or abs(cachedStart - newStart) > 0.5 then if not cachedStart or abs(cachedStart - newStart) > 0.5 then
if not cd.configCached or cd.cachedAnim ~= cfg.debuffanim or cd.cachedText ~= cfg.debufftext or cd.cachedReverse ~= cfg.debreverse then
cd.pfCooldownStyleAnimation = cfg.debuffanim
cd.pfCooldownStyleText = cfg.debufftext
cd.pfCooldownReverse = cfg.debreverse or 0
cd:SetAlpha(cfg.debuffanim == 1 and 1 or 0)
cd.cachedAnim = cfg.debuffanim
cd.cachedText = cfg.debufftext
cd.cachedReverse = cfg.debreverse
cd.configCached = true
end
CooldownFrame_SetTimer(cd, newStart, effDuration, 1) CooldownFrame_SetTimer(cd, newStart, effDuration, 1)
plate.cdCache[index] = plate.cdCache[index] or {} plate.cdCache[index] = plate.cdCache[index] or {}
plate.cdCache[index].effect = effect plate.cdCache[index].effect = effect
+1 -1
View File
@@ -115,7 +115,7 @@ pfUI:RegisterModule("totems", function ()
self.bar[i].cdbg:SetPoint("CENTER", self.bar[i], "CENTER", 0, 0) self.bar[i].cdbg:SetPoint("CENTER", self.bar[i], "CENTER", 0, 0)
self.bar[i].cd = self.bar[i].cd or CreateFrame("Cooldown", "pfTotemsBar"..i.."Cooldown", self.bar[i].cdbg, "CooldownFrameTemplate") self.bar[i].cd = self.bar[i].cd or CreateFrame("Cooldown", "pfTotemsBar"..i.."Cooldown", self.bar[i].cdbg, "CooldownFrameTemplate")
self.bar[i].cd.pfCooldownStyleAnimation = 1 self.bar[i].cd.pfCooldownStyleAnimation = 1
self.bar[i].cd.pfCooldownReverse = tonumber(pfUI_config.totems.cooldown_reverse) or 0 self.bar[i].cd:SetReverse(pfUI_config.totems.cooldown_reverse == "1")
self.bar[i].cd.pfCooldownType = "ALL" self.bar[i].cd.pfCooldownType = "ALL"
self.bar[i]:RegisterForClicks("LeftButtonUp", "RightButtonUp") self.bar[i]:RegisterForClicks("LeftButtonUp", "RightButtonUp")