Skip to content

Commit

Permalink
Colorize difficulties
Browse files Browse the repository at this point in the history
  • Loading branch information
xwidghet committed Dec 20, 2016
1 parent c676be9 commit f712c4f
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ local function GetDisplayScore()
return score
end

-- Arbitrarily chosen 40 difficulty as the peak color
local function getMSDColor (diff)
if diff then
return HSV(math.max(95 - (diff/40)*150, -50), 0.9, 0.9)
end;
return HSV(0, 0.9, 0.9)
end;

t[#t+1] = Def.Actor{
SetCommand=function(self)
if song then
Expand Down Expand Up @@ -332,7 +340,7 @@ t[#t+1] = LoadFont("Common Large") .. {
if song then
local meter = GAMESTATE:GetCurrentSteps(PLAYER_1):GetMSD(getCurRateValue(), 1)
self:settextf("Speed: %05.2f",meter)
self:diffuse(byDifficultyMeter(meter))
self:diffuse(getMSDColor(meter))
else
self:settext("")
end
Expand All @@ -348,7 +356,7 @@ t[#t+1] = LoadFont("Common Large") .. {
if song then
local meter = GAMESTATE:GetCurrentSteps(PLAYER_1):GetMSD(getCurRateValue(), 2)
self:settextf("Stam: %05.2f",meter)
self:diffuse(byDifficultyMeter(meter))
self:diffuse(getMSDColor(meter))
else
self:settext("")
end
Expand All @@ -364,7 +372,7 @@ t[#t+1] = LoadFont("Common Large") .. {
if song then
local meter = GAMESTATE:GetCurrentSteps(PLAYER_1):GetMSD(getCurRateValue(), 3)
self:settextf("Jack: %05.2f",meter)
self:diffuse(byDifficultyMeter(meter))
self:diffuse(getMSDColor(meter))
else
self:settext("")
end
Expand Down

0 comments on commit f712c4f

Please sign in to comment.