PathOfBuilding
PathOfBuilding copied to clipboard
Custom display stats
This is a very technical change too make it easier to support custom display stats in the future
For now this allows users to save/load custom display stats to settings, though there is no UI to do so and thus requires users to add them manually, this PR is mainly meant to make it easier to add a UI in future to allow users to easily customise it
eg somthing like
<StatList>
<statGroup index="1">
<stat label="Total Life" displayStat="true"/>
<stat label=" Total Life" minionDisplayStat="true"/>
<stat label="Unreserved Life" displayStat="true"/>
<stat label="Life Recoverable" displayStat="true"/>
<stat label="Life Regen" color="^x7070FF" compPercent="true" displayStat="true" minionDisplayStat="true"/>
</statGroup>
</StatList>
looks like
and gives percentage change when hovering over regen
the amount of data needed to be saved is reduced by the fact that most of the data is reused from the old display stats if the stat shares the same label, overriding any keys with ones saved in settings (as well as displayStat/minionDisplayStat/extraSaveStat)