@@ -84,20 +84,26 @@ local function highlightIfOver(self)
84
84
self :diffusealpha (1 )
85
85
end
86
86
end
87
-
87
+ local moped
88
88
-- Only works if ... it should work
89
89
-- You know, if we can see the place where the scores should be.
90
90
local function updateLeaderBoardForCurrentChart ()
91
91
local top = SCREENMAN :GetTopScreen ()
92
92
if top :GetMusicWheel ():IsSettled () and ((getTabIndex () == 2 and nestedTab == 2 ) or collapsed ) then
93
- local chartkey = GAMESTATE :GetCurrentSteps (PLAYER_1 ):GetChartKey ()
94
- DLMAN :RequestChartLeaderBoardFromOnline (chartkey )
93
+ local steps = GAMESTATE :GetCurrentSteps (PLAYER_1 )
94
+ if steps then
95
+ DLMAN :RequestChartLeaderBoardFromOnline (steps :GetChartKey ())
96
+ moped :queuecommand (" ChartLeaderboardUpdate" )
97
+ else
98
+ moped :queuecommand (" Bort" )
99
+ end
95
100
end
96
101
end
97
102
98
103
local ret =
99
104
Def .ActorFrame {
100
105
BeginCommand = function (self )
106
+ moped = self :GetChild (" ScoreDisplay" )
101
107
self :queuecommand (" Set" ):visible (false )
102
108
self :GetChild (" LocalScores" ):xy (frameX , frameY ):visible (false )
103
109
self :GetChild (" ScoreDisplay" ):xy (frameX , frameY ):visible (false )
@@ -143,9 +149,6 @@ local ret =
143
149
self :queuecommand (" Set" )
144
150
updateLeaderBoardForCurrentChart ()
145
151
end ,
146
- UpdateChartMessageCommand = function (self )
147
- self :queuecommand (" Set" )
148
- end ,
149
152
CollapseCommand = function (self )
150
153
collapsed = true
151
154
resetTabIndex ()
@@ -173,7 +176,7 @@ local ret =
173
176
end ,
174
177
CurrentRateChangedMessageCommand = function (self )
175
178
if ((getTabIndex () == 2 and nestedTab == 2 ) or collapsed ) and DLMAN :GetCurrentRateFilter () then
176
- MESSAGEMAN : Broadcast (" ChartLeaderboardUpdate" )
179
+ moped : queuecommand (" ChartLeaderboardUpdate" )
177
180
end
178
181
end
179
182
}
@@ -702,7 +705,6 @@ function nestedTabButton(i)
702
705
if isOver (self ) then
703
706
nestedTab = i
704
707
MESSAGEMAN :Broadcast (" NestedTabChanged" )
705
- MESSAGEMAN :Broadcast (" ChartLeaderboardUpdate" )
706
708
if nestedTab == 1 then
707
709
self :GetParent ():GetParent ():GetChild (" ScoreDisplay" ):visible (false )
708
710
self :GetParent ():GetParent ():GetParent ():GetChild (" StepsDisplay" ):visible (true )
@@ -711,9 +713,6 @@ function nestedTabButton(i)
711
713
self :GetParent ():GetParent ():GetParent ():GetChild (" StepsDisplay" ):visible (false )
712
714
end
713
715
end
714
- end ,
715
- NestedTabChangedMessageCommand = function (self )
716
- self :queuecommand (" Set" )
717
716
end
718
717
}
719
718
}
0 commit comments