Skip to content

Commit e3ea906

Browse files
committed
feat: ✨ add char level to XP + bold gauges
1 parent cbcc1e5 commit e3ea906

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

prs-stats.lua

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
PRSstats = PRSstats or {}
22
function PRSstats.stats()
3+
local level = tonumber(gmcp.Char.Vitals.level)
34
local SUG = require("PRS.sug")
45
PRSstats.UW = Geyser.UserWindow:new({name = "Stats", titleText ="Vitals", x = "75%", y = "100", docked = true})
56

@@ -10,7 +11,7 @@ function PRSstats.stats()
1011
height = 50,
1112
width = "95%", -- everything up to here is standard Geyser.Gauge
1213
updateTime = 250, -- this timer will update every 250ms, or 4 times a second
13-
textTemplate = " HP: |c / |m (|p%)", -- gauge will show "HP: 500/1000 (50%)" as the text if you had 500 current and 1000 max hp
14+
textTemplate = "  HP: |c / |m (|p%)", -- gauge will show "HP: 500/1000 (50%)" as the text if you had 500 current and 1000 max hp
1415
currentVariable = "gmcp.Char.Vitals.hp", --if gmcp.Char.Vitals.hp is nil or unreachable, it will use the defaultCurrent of 50
1516
maxVariable = "gmcp.Char.Vitals.maxhp", --if gmcp.Char.Vitals.maxhp is nil or unreachable, it will use the defaultMax of 100
1617
}, PRSstats.UW)
@@ -28,13 +29,16 @@ function PRSstats.stats()
2829
border-radius: 7;
2930
padding: 3px;
3031
]])
32+
HPbar.text:setStyleSheet([[
33+
font-weight: bold;
34+
]])
3135
ENbar = SUG:new({
3236
name = "EN",
3337
y = 70,
3438
height = 50,
3539
width = "95%",
3640
updateTime = 250,
37-
textTemplate = " EN: |c / |m (|p%)",
41+
textTemplate = "  EN: |c / |m (|p%)",
3842
currentVariable = "gmcp.Char.Vitals.en",
3943
maxVariable = "gmcp.Char.Vitals.maxen",
4044
}, PRSstats.UW)
@@ -52,13 +56,16 @@ function PRSstats.stats()
5256
border-radius: 7;
5357
padding: 3px;
5458
]])
59+
ENbar.text:setStyleSheet([[
60+
font-weight: bold;
61+
]])
5562
STbar = SUG:new({
5663
name = "ST",
5764
y = 130,
5865
height = 50,
5966
width = "95%",
6067
updateTime = 250,
61-
textTemplate = " ST: |c / |m (|p%)",
68+
textTemplate = "  ST: |c / |m (|p%)",
6269
currentVariable = "gmcp.Char.Vitals.st",
6370
maxVariable = "gmcp.Char.Vitals.maxst",
6471
}, PRSstats.UW)
@@ -74,13 +81,16 @@ function PRSstats.stats()
7481
border-style: solid;
7582
border-radius: 7;
7683
padding: 3px;]])
84+
STbar.text:setStyleSheet([[
85+
font-weight: bold;
86+
]])
7787
XPbar = SUG:new({
7888
name = "XP",
7989
y = "190",
8090
height = 50,
8191
width = "95%",
8292
updateTime = 250,
83-
textTemplate = " XP: |c / |m",
93+
textTemplate = "  Level "..level.." XP: |c / |m",
8494
currentVariable = "gmcp.Char.Vitals.xp",
8595
maxVariable = "gmcp.Char.Vitals.nl",
8696
}, PRSstats.UW)
@@ -98,4 +108,7 @@ function PRSstats.stats()
98108
border-radius: 7;
99109
padding: 3px;
100110
]])
111+
XPbar.text:setStyleSheet([[
112+
font-weight: bold;
113+
]])
101114
end

0 commit comments

Comments
 (0)