From e90b89a68b1e1a7aed09529f268de3c87f4d8a10 Mon Sep 17 00:00:00 2001 From: Stack Date: Fri, 4 Mar 2022 08:13:19 -0800 Subject: [PATCH 1/3] feat(mapper): :sparkles: add Combo Points gauge + move XP to top --- prs-stats.lua | 91 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 61 insertions(+), 30 deletions(-) diff --git a/prs-stats.lua b/prs-stats.lua index 1279580..e8be0e2 100644 --- a/prs-stats.lua +++ b/prs-stats.lua @@ -1,13 +1,40 @@ PRSstats = PRSstats or {} function PRSstats.stats() - -- local level = tonumber(gmcp.Char.Vitals.level) local SUG = require("PRS.sug") PRSstats.UW = Geyser.UserWindow:new({name = "Stats", titleText ="Vitals", x = "75%", y = "100", docked = true}) - -- the following will watch "gmcp.Char.Vitals.hp" and "gmcp.Char.Vitals.maxhp" - -- and update itself every 250 milliseconds + -- Experience Points Gauge + XPbar = SUG:new({ + name = "XP", + height = 50, + width = "95%", + updateTime = 250, + textTemplate = " XP: |c / |m", + currentVariable = "gmcp.Char.Vitals.xp", + maxVariable = "gmcp.Char.Vitals.nl", + }, PRSstats.UW) + XPbar.front:setStyleSheet([[background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #3399ff, stop: 0.1 #0080ff, stop: 0.49 #0000ff, stop: 0.5 #0000cc, stop: 1 #0000ff); + border-top: 1px black solid; + border-left: 1px black solid; + border-bottom: 1px black solid; + border-radius: 7; + padding: 3px; + ]]) + XPbar.back:setStyleSheet([[background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #0066cc, stop: 0.1 #004c99, stop: 0.49 #000099, stop: 0.5 #000066, stop: 1 #000099); + border-width: 1px; + border-color: black; + border-style: solid; + border-radius: 7; + padding: 3px; + ]]) + XPbar.text:setStyleSheet([[ + font-weight: bold; + ]]) + + -- Hit Points Gauge HPbar = SUG:new({ name = "HP", + y = "70", height = 50, width = "95%", -- everything up to here is standard Geyser.Gauge updateTime = 250, -- this timer will update every 250ms, or 4 times a second @@ -32,9 +59,11 @@ function PRSstats.stats() HPbar.text:setStyleSheet([[ font-weight: bold; ]]) + + -- Energy Points Gauge ENbar = SUG:new({ name = "EN", - y = 70, + y = 130, height = 50, width = "95%", updateTime = 250, @@ -59,9 +88,11 @@ function PRSstats.stats() ENbar.text:setStyleSheet([[ font-weight: bold; ]]) + + -- Stamina Points Gauge STbar = SUG:new({ name = "ST", - y = 130, + y = 190, height = 50, width = "95%", updateTime = 250, @@ -84,32 +115,32 @@ function PRSstats.stats() STbar.text:setStyleSheet([[ font-weight: bold; ]]) - XPbar = SUG:new({ - name = "XP", - y = "190", - height = 50, - width = "95%", + + -- Combo Points Gauge + CPbar = SUG:new({ + name="CP", + y="250", + height=50, + width="95%", updateTime = 250, --- textTemplate = "  Level "..level.." XP: |c / |m", - textTemplate = " XP: |c / |m", - currentVariable = "gmcp.Char.Vitals.xp", - maxVariable = "gmcp.Char.Vitals.nl", + textTemplate = "  Combo: |c / |m (|p%)", + currentVariable = "gmcp.Char.Vitals.combo", + maxcombo = 100, + maxVariable = "maxcombo", }, PRSstats.UW) - XPbar.front:setStyleSheet([[background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #3399ff, stop: 0.1 #0080ff, stop: 0.49 #0000ff, stop: 0.5 #0000cc, stop: 1 #0000ff); - border-top: 1px black solid; - border-left: 1px black solid; - border-bottom: 1px black solid; - border-radius: 7; - padding: 3px; - ]]) - XPbar.back:setStyleSheet([[background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #0066cc, stop: 0.1 #004c99, stop: 0.49 #000099, stop: 0.5 #000066, stop: 1 #000099); - border-width: 1px; - border-color: black; - border-style: solid; - border-radius: 7; - padding: 3px; - ]]) - XPbar.text:setStyleSheet([[ + CPbar.front:setStyleSheet([[background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f04141, stop: 0.1 #ef2929, stop: 0.49 #cc0000, stop: 0.5 #a40000, stop: 1 #cc0000); + border-top: 1px black solid; + border-left: 1px black solid; + border-bottom: 1px black solid; + border-radius: 7; + padding: 3px;]]) + CPbar.back:setStyleSheet([[background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #bd3333, stop: 0.1 #bd2020, stop: 0.49 #990000, stop: 0.5 #700000, stop: 1 #990000); + border-width: 1px; + border-color: black; + border-style: solid; + border-radius: 7; + padding: 3px;]]) + CPbar.text:setStyleSheet([[ font-weight: bold; - ]]) + ]]) end \ No newline at end of file From 99288126635a9626a17847d373030d6062ec798b Mon Sep 17 00:00:00 2001 From: Stack Date: Fri, 4 Mar 2022 08:31:08 -0800 Subject: [PATCH 2/3] feat(stats): :sparkles: add Rage Points gauge + resize --- prs-stats.lua | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/prs-stats.lua b/prs-stats.lua index e8be0e2..c13d50a 100644 --- a/prs-stats.lua +++ b/prs-stats.lua @@ -120,7 +120,7 @@ function PRSstats.stats() CPbar = SUG:new({ name="CP", y="250", - height=50, + height=25, width="95%", updateTime = 250, textTemplate = "  Combo: |c / |m (|p%)", @@ -143,4 +143,32 @@ function PRSstats.stats() CPbar.text:setStyleSheet([[ font-weight: bold; ]]) + + -- Rage Points Gauge + RPbar = SUG:new({ + name="RP", + y="280", + height=25, + width="95%", + updateTime = 250, + textTemplate = "  Rage: |c / |m (|p%)", + currentVariable = "gmcp.Char.Vitals.rage", + maxrage = 100, + maxVariable = "maxrage", + }, PRSstats.UW) + RPbar.front:setStyleSheet([[background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f04141, stop: 0.1 #ef2929, stop: 0.49 #cc0000, stop: 0.5 #a40000, stop: 1 #cc0000); + border-top: 1px black solid; + border-left: 1px black solid; + border-bottom: 1px black solid; + border-radius: 7; + padding: 3px;]]) + RPbar.back:setStyleSheet([[background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #bd3333, stop: 0.1 #bd2020, stop: 0.49 #990000, stop: 0.5 #700000, stop: 1 #990000); + border-width: 1px; + border-color: black; + border-style: solid; + border-radius: 7; + padding: 3px;]]) + RPbar.text:setStyleSheet([[ + font-weight: bold; + ]]) end \ No newline at end of file From ed4fd095d46932a37439a0d464675a2fc2d0e774 Mon Sep 17 00:00:00 2001 From: Stack Date: Fri, 4 Mar 2022 08:34:07 -0800 Subject: [PATCH 3/3] fix(stats): :lipstick: restore text padding on HP gauge --- prs-stats.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prs-stats.lua b/prs-stats.lua index c13d50a..0b1a6e0 100644 --- a/prs-stats.lua +++ b/prs-stats.lua @@ -9,7 +9,7 @@ function PRSstats.stats() height = 50, width = "95%", updateTime = 250, - textTemplate = " XP: |c / |m", + textTemplate = "  XP: |c / |m", currentVariable = "gmcp.Char.Vitals.xp", maxVariable = "gmcp.Char.Vitals.nl", }, PRSstats.UW)