Skip to content

Commit

Permalink
Add lower group display and make upper bound dynamic
Browse files Browse the repository at this point in the history
it tells you the max ssr now
  • Loading branch information
poco0317 committed Jul 7, 2020
1 parent edab953 commit fa0c630
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions Themes/Til Death/BGAnimations/_calcdisplay.lua
Original file line number Diff line number Diff line change
@@ -611,8 +611,8 @@ o[#o + 1] = Def.Quad {
o[#o+1] = LoadFont("Common Normal") .. {
Name = "G1Group",
InitCommand = function(self)
self:xy(-plotWidth/2,-plotHeight/2)
self:halign(0):valign(0)
self:xy(-plotWidth/2 + 2,-plotHeight/2 + 5)
self:halign(0)
self:zoom(0.25)
self:settextf("Group %d", activeModGroup)
end,
@@ -691,6 +691,20 @@ o[#o + 1] = Def.Quad {
end
}

-- mod group indicators appears top left of top graph bg
o[#o+1] = LoadFont("Common Normal") .. {
Name = "G2Group",
InitCommand = function(self)
self:xy(-plotWidth/2 + 2, plotHeight/2 + 12)
self:halign(0)
self:zoom(0.25)
self:settextf("Group %d", activeDiffGroup)
end,
UpdateActiveLowerGraphMessageCommand = function(self)
self:settextf("Group %d", activeDiffGroup)
end
}

o[#o + 1] = LoadFont("Common Normal") .. {
InitCommand = function(self)
self:xy(-plotWidth/4, plotHeight + 5 + plotHeight/2 + 35)
@@ -939,14 +953,23 @@ end
-- lower graph average text
o[#o + 1] = LoadFont("Common Normal") .. {
InitCommand = function(self)
self:xy(-plotWidth/2 + 5, plotHeight/2 + 10):halign(0):valign(0)
self:zoom(0.4)
self:xy(-plotWidth/2 + 30, plotHeight/2 + 12):halign(0)
self:zoom(0.35)
self:settext("")
end,
DoTheThingCommand = function(self)
if song and enabled then
self:settextf("Upper Bound: %.4f", lowerGraphMax)
end
end,
UpdateActiveLowerGraphMessageCommand = function(self)
if song and enabled then
if activeDiffGroup == -1 or (diffGroups[activeDiffGroup] and diffGroups[activeDiffGroup]["SSRS"]) then
self:settextf("Upper Bound: %.4f", math.max(unpack(ssrs[1])))
else
self:settextf("Upper Bound: %.4f", lowerGraphMax)
end
end
end
}

0 comments on commit fa0c630

Please sign in to comment.