oUF

99.9k Downloads

Suggestion, new element: BuilderSpender

Sticklord opened this issue ยท 8 comments

commented

This is the element that displays an overlay on the power bar when you gain/lose large portions (more than 10%) of your power, and also flashes when you're at maximum power, for rogues and demon hunters for example. Is this something that could be added?

This is my take on it, but I'm using most of blizzards methods and template because my frames look alot like the default ones.

https://github.com/Sticklord/oUF_Abu/blob/master/Modules/oUF_BuilderSpender.lua

commented

TBH, it's sorta cool idea, but it's poorly executed by Blizzard, cuz it's added really late in Beta, only few weeks before Legion release.

However it shouldn't be implemented as a new element, cuz in fact it's power prediction, but for builder-spender types of power, e.g. energy, focus, etc. So one may want to extend existing powerprediction element, instead of creating a new one ๐Ÿ’ก

I may work on it, but I have no time rn. I need to fix my own addons first T_T

commented

Yeah the blizzard implementation was kind of wierd with the onupdate of detecting if it should show etc. But it doesn't have much in common with the power prediction. The builderspender animates the gains/losses that has already happened, while the prediction, well, predicts the gain?/loss if the spell goes trough.

Maybe I'll draw up some sketch of it aswell.

commented

@StickLord, nah, that's fine, there's no need to draw sketches ๐Ÿ˜

They tried to implement it as power prediction first, but sorta failed.

It has everything in common w/ power prediction, main difference is abilities are instant casts, so you can't show power cost while casting, a.k.a. predict power cost, but fundamentally they're the same thing, they show how much power is spent on ability.

commented

Yeah when you put it like that i guess it makes sense ๐Ÿ˜„

commented

Hi!

So, after thinking about it for a while, I now think that it shouldn't be a part PowerPrediction element, cuz it'd be quite misleading, name like PowerUsage would be more befitting.

However, I'm not sure that it should be a part of oUF either. Problem is that this thing relies on status bar "smoothing" to display info on power gain/loss, and bar animations ARE NOT a part of oUF core, they're handled by layout.

But we could implement a "data provider" element, if enabled it'd provide info on power gain/loss by measuring difference of power levels between UNIT_SPELLCAST_SENT and UNIT_SPELLCAST_SUCCEEDED events. And then layout could use said data to do something fancy.

Right now oUF has NO "data provider" elements, hence I'm not sure about adding one.

@p3lim, @Rainrider, what do you think about it? O_o

commented

No to the data provider element, that's middleware that is completely unnecessary.

The element however has a place in oUF, as oUF's mission was and still is to replicate all the default functionality of the standard unitframes.

commented

@p3lim, yeah, I might be over-complicating things rn, hehe, and we all know the reason why ๐Ÿ˜ด

It could be a widget similar to PowerPrediction, oUF would calculate and set all values, but layout would have to handle re-anchoring and animations via PostUpdate.

commented

Closing this one too.

Please see first comment of #316 for more info on how to implement it in your layout.