Skip to content

Commit

Permalink
Fix highscore list
Browse files Browse the repository at this point in the history
- Remove local scores
- Correctly display errors
  • Loading branch information
natano committed May 10, 2021
1 parent 5e37956 commit 5cbd4b3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions BGAnimations/ScreenEvaluation common/Panes/Pane7/default.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ local pane = Def.ActorFrame{
-- -----------------------------------------------------------------------

-- 22px RowHeight by default, which works for displaying 10 machine HighScores
local args = { Player=player, RowHeight=22}
local args = { Player=player, RowHeight=22, HideScores=true }

-- top 10 machine HighScores
args.NumHighScores = 10
pane[#pane+1] = LoadActor(THEME:GetPathB("", "_modules/HighScoreList.lua"), args)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ local AutoSubmitRequestProcessor = function(res, overlay)
if j == 1 then
if data and data[playerStr] then
if data[playerStr]["isRanked"] then
SetEntryText("", "No Scores", "", entry)
SetEntryText("", "No Scores", "", "", entry)
else
SetEntryText("", "Chart Not Ranked", "", entry)
SetEntryText("", "Chart Not Ranked", "", "", entry)
end
else
SetEntryText("", "No Scores", "", entry)
SetEntryText("", "No Scores", "", "", entry)
end
else
-- Empty out the remaining rows.
Expand Down Expand Up @@ -274,6 +274,7 @@ af[#af+1] = LoadFont("Common Normal").. {
end,
SubmitFailedCommand=function(self)
self:settext("Submit Failed 😞")
DiffuseEmojis(self)
end,
ServiceDisabledCommand=function(self)
self:settext("Submit Disabled")
Expand All @@ -298,6 +299,7 @@ af[#af+1] = LoadFont("Common Normal").. {
end,
SubmitFailedCommand=function(self)
self:settext("Submit Failed 😞")
DiffuseEmojis(self)
end,
ServiceDisabledCommand=function(self)
self:settext("Submit Disabled")
Expand Down
5 changes: 2 additions & 3 deletions BGAnimations/_modules/HighScoreList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,13 @@ end

-- ---------------------------------------------


for i=lower,upper do

local row_index = i-lower
local score, name, date
local numbers = {}

if HighScores[i] then
if HighScores[i] and not args.HideScores then
score = FormatPercentScore(HighScores[i]:GetPercentDP())
name = HighScores[i]:GetName()
date = HighScores[i]:GetDate()
Expand Down Expand Up @@ -175,4 +174,4 @@ for i=lower,upper do
end


return af
return af

0 comments on commit 5cbd4b3

Please sign in to comment.