Thread Tools Display Modes
11-11-22, 10:30 AM   #1
EKE
An Aku'mai Servant
 
EKE's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2011
Posts: 37
visibleAuras in ouf 11

I do this to force nameplates aura icon justify to center, but visibleAuras was removed in ouf 11, dunno what new argument should i replaced

Code:
local function PreSetPosition(self, max)
	return 1, self.visibleAuras
end

local function SetPosition(self, from, to)
	for i = from, to do
		local button = self[i]
		if not button then break end

		if i == 1 then
			button:SetPoint("CENTER", -(((self.size + self.spacing) * (to - 1)) / 2), 0)
		else
			button:SetPoint("LEFT", self[i-1], "RIGHT", self.spacing, 0)
		end
	end
end
  Reply With Quote
11-11-22, 03:16 PM   #2
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Nothing, it felt rudimentary, so I removed it. If you want to know how many auras are visible, it's just #element.sorted for .Buffs and .Debuffs, or #element.sortedBuffs + #element.sortedDebuffs for .Auras. And if you create a gap between buffs and debuffs in .Auras you'll need to add 1 if both #element.sortedBuffs and #element.sortedDebuffs are > 0.
__________________
  Reply With Quote
11-11-22, 05:10 PM   #3
EKE
An Aku'mai Servant
 
EKE's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2011
Posts: 37
so PreSetPosition removed !_!

force nameplates aura icon justify to center need set position when aura buttons appear/disappear everytime, PreSetPosition can to this work simply,

but #element.sorted can only update when created, so need to do a PostUpdate for them now......Q.o sadly
  Reply With Quote
11-13-22, 06:01 AM   #4
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by EKE View Post
so PreSetPosition removed !_!

force nameplates aura icon justify to center need set position when aura buttons appear/disappear everytime, PreSetPosition can to this work simply,

but #element.sorted can only update when created, so need to do a PostUpdate for them now......Q.o sadly
So you're using PreSetPosition as a way to force a SetPosition call? In all honesty, I'd rather just add an option that forces the element to reposition buttons whenever the number of visible auras changes. The auras element is still actively worked on, so I might throw it in for the next iteration. Cheer up :>
__________________
  Reply With Quote
11-13-22, 06:10 PM   #5
EKE
An Aku'mai Servant
 
EKE's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2011
Posts: 37
Originally Posted by lightspark View Post
So you're using PreSetPosition as a way to force a SetPosition call? In all honesty, I'd rather just add an option that forces the element to reposition buttons whenever the number of visible auras changes. The auras element is still actively worked on, so I might throw it in for the next iteration. Cheer up :>
option please !_!
  Reply With Quote
11-13-22, 06:20 PM   #6
EKE
An Aku'mai Servant
 
EKE's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2011
Posts: 37
some more issue i found but not sure its my fault or what happened......

Use Auras and .numBuffs/.numDebuffs = 0 will stil show 1 buff/debuff

Gap cannot hide when no buff auras

.numTotal = 14 will show 15 auras and gap = totally 16

Last edited by EKE : 11-13-22 at 06:22 PM.
  Reply With Quote
11-13-22, 07:45 PM   #7
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
It's a known bug, I just decided to wait and fix a bunch of stuff in one fell swoop. There should be a PR for auras by this weekend.
__________________

Last edited by lightspark : 11-13-22 at 08:08 PM.
  Reply With Quote
11-14-22, 07:44 PM   #8
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
To anyone who's been following this thread, the PR with new features and fixes can be found here.
__________________
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » visibleAuras in ouf 11


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off