WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   visibleAuras in ouf 11 (https://www.wowinterface.com/forums/showthread.php?t=59334)

EKE 11-11-22 10:30 AM

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:confused:

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


lightspark 11-11-22 03:16 PM

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.

EKE 11-11-22 05:10 PM

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

lightspark 11-13-22 06:01 AM

Quote:

Originally Posted by EKE (Post 341553)
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 :>

EKE 11-13-22 06:10 PM

Quote:

Originally Posted by lightspark (Post 341566)
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 !_!

EKE 11-13-22 06:20 PM

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

lightspark 11-13-22 07:45 PM

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.

lightspark 11-14-22 07:44 PM

To anyone who's been following this thread, the PR with new features and fixes can be found here.


All times are GMT -6. The time now is 01:58 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI