Hello everyone,
I’m working on a customized UI using ElvUI and WeakAuras.
ElvUI includes a module called “DataBars”, which adds 4 individual DataBars for XP, Reputation, Honor and Azerite.
They are all controlled individually, so you can move them and adjust their width and height individually.
For my UI in particular, my goal is to have all 4 DataBars ‘stacked’ on top of each other, all 4 occupying the same space on the screen, in a single ‘unibar’ of sorts.
Since I may want to display Rep vs Azerite in some cases, I need to determine a way to display one of these DataBars, while also hiding the other 3, as to avoid one DataBar overlapping another which would hide the one I wish to see, due to all 4 of them occupying the same space on the screen.
I asked over on the ElvUI Discord, and did find out that there is a /run script that can be ran to hide and show each DataBar (as opposed to showing/hiding them via the ElvUI config menu)
This is what it looks like for the experience bar:
if ElvUI[1].DataBars.db.experience.enable == true then
ElvUI[1].DataBars.db.experience.enable = false else
ElvUI[1].DataBars.db.experience.enable = true end;
ElvUI[1].DataBars:EnableDisable_ExperienceBar()
So if I just stick this in a /run, or even with an OnClick, it works fine, toggling the XP bar on each run.
And I was told to just plug in the info for the other 3 bars - honor, rep and azerite - to do the same.
What I need help with:
I want to have all 4 DataBars behind a run function (my plan is to stick it in behind a single button) that will cycle through all 4 DataBars.
So, first click will show the XP bar. Second click will hide the XP bar, and show the Rep bar. 3rd, show hide rep and show honor. 4th, hide honor and show azerite. And on the 5th, hide azerite and show xp.
And due to the toggle nature of the functions (as opposed to being individual functions for hiding and showing), it must check to see if others are show, and ensure they are hidden.
Thanks,
– K