xpbar: rewrite module to share more code

* remove duplicate variable initializations
* remove duplicate function assignments
* place all configs to the parent frame
* add option for custom display modes
This commit is contained in:
shagu
2020-06-01 11:09:36 +02:00
parent fb6130a460
commit 8e3d3678a1
2 changed files with 216 additions and 175 deletions
+2
View File
@@ -516,6 +516,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("panel", "micro", "enable", "0")
pfUI:UpdateConfig("panel", "bag", "ignorespecial", "1")
pfUI:UpdateConfig("panel", "xp", "xp_always", "0")
pfUI:UpdateConfig("panel", "xp", "xp_display", "XPFLEX")
pfUI:UpdateConfig("panel", "xp", "xp_timeout", "5")
pfUI:UpdateConfig("panel", "xp", "xp_width", "5")
pfUI:UpdateConfig("panel", "xp", "xp_height", "5")
@@ -526,6 +527,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("panel", "xp", "rest_color", "1,.25,1,.5")
pfUI:UpdateConfig("panel", "xp", "rep_always", "0")
pfUI:UpdateConfig("panel", "xp", "rep_display", "REP")
pfUI:UpdateConfig("panel", "xp", "rep_timeout", "5")
pfUI:UpdateConfig("panel", "xp", "rep_width", "5")
pfUI:UpdateConfig("panel", "xp", "rep_height", "5")