Closed zjx2172 closed 2 years ago
Addresses #1843 "Resource bar with data from the Lua script". Could be used to address #1322 "For Bar/BarV, add an option to change the data source to the icon's stacks"
Responded to first round of comments with commit 9652a96
Added three commits to address requested changes
I've added an icon type called "Custom Value". It allows the user to provide some Lua code that returns a current value and maximum value, which is then shown as bar icon similar to the "Resources" type.
For example, to have a bar that shows the player's valor points, the following code could be used:
I think it adds many possibilities for users to expand their TMW capabilities, only limited by the WoW API. I was motivated by wanting to track the power absorbed by my "Primordial Arcanic Pulsar" druid legendary. Other possibilities include tracking the amount remaining on an absorb shield, tracking how much conquest is needed for an upgrade, or showing one's current haste relative to a soft cap.
I spliced together code from a few different places and got it working. There may be some unnecessary or duplicate code. Feel free to edit as you see fit.