Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #12

Merged
merged 3 commits into from
Mar 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 53 additions & 53 deletions prs-stats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,6 @@ PRSstats = PRSstats or {}
function PRSstats.stats()
local SUG = require("PRS.sug")
PRSstats.UW = Geyser.UserWindow:new({name = "Stats", titleText ="Vitals", x = "75%", y = "100", docked = true})

-- 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({
Expand Down Expand Up @@ -115,60 +87,88 @@ function PRSstats.stats()
STbar.text:setStyleSheet([[
font-weight: bold;
]])
-- Combo Points Gauge
CPbar = SUG:new({
name="CP",
y="250",

-- Rage Points Gauge
RPbar = SUG:new({
name="RP",
y="280",
height=25,
width="95%",
updateTime = 250,
textTemplate = "  Combo: |c / |m (|p%)",
currentVariable = "gmcp.Char.Vitals.combo",
maxcombo = 100,
maxVariable = "maxcombo",
textTemplate = "  Rage: |c",
currentVariable = "gmcp.Char.Vitals.rage",
maxrage = 100,
maxVariable = "maxrage",
}, PRSstats.UW)
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);
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;]])
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);
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;]])
CPbar.text:setStyleSheet([[
RPbar.text:setStyleSheet([[
font-weight: bold;
]])

-- Rage Points Gauge
RPbar = SUG:new({
name="RP",
y="280",
]])
-- Combo Points Gauge
CPbar = SUG:new({
name="CP",
y="250",
height=25,
width="95%",
updateTime = 250,
textTemplate = "  Rage: |c / |m (|p%)",
currentVariable = "gmcp.Char.Vitals.rage",
maxrage = 100,
maxVariable = "maxrage",
textTemplate = "  Combo: |c",
currentVariable = "gmcp.Char.Vitals.combo",
maxcombo = 100,
maxVariable = "maxcombo",
}, 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);
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;]])
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);
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;]])
RPbar.text:setStyleSheet([[
CPbar.text:setStyleSheet([[
font-weight: bold;
]])

-- 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;
]])
end