Skip to content

Commit

Permalink
make new actor for current personal best in goal tracker tab
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Apr 30, 2017
1 parent 515a8f7 commit f25a925
Showing 1 changed file with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ local function makescoregoal(i)
SetCommand=function(self)
if update then
if sg then
self:settextf("%5.f%% (Best: %5.2f)", sg:GetPercent(), profile:GetPBWifeScoreByKey(ck, sg:GetRate()) * 100)
self:settextf("%5.f%%", sg:GetPercent())
self:visible(true)
else
self:visible(false)
Expand All @@ -222,6 +222,27 @@ local function makescoregoal(i)
end,
UpdateGoalsMessageCommand=cmd(queuecommand,"Set")
},
LoadFont("Common Large") .. {
InitCommand=cmd(xy,30,goalrow2Y;halign,0;zoom,0.2;diffuse,getMainColor('positive')),
SetCommand=function(self)
if update then
if sg then
local pb = sg:GetCurrentPB()
if pb then
self:settextf("(Best: %5.2f%%)", pb:GetWifeScore() * 100)
self:diffuse(getGradeColor(pb:GetWifeGrade()))
self:visible(true)
else
self:settextf("(Best: %5.2f%%)", 0)
self:diffuse(byAchieved(sg))
end
else
self:visible(false)
end
end
end,
UpdateGoalsMessageCommand=cmd(queuecommand,"Set")
},
Def.Quad{
InitCommand=cmd(y,goalrow2Y;halign,0;zoomto,25,buttonheight;diffuse,getMainColor('positive');diffusealpha,buttondiffuse),
MouseLeftClickMessageCommand=function(self)
Expand Down

0 comments on commit f25a925

Please sign in to comment.