@@ -63,6 +63,9 @@ class LeaderboardsHandler {
63
63
64
64
this . panels . tracksDropdown . RemoveAllOptions ( ) ;
65
65
this . panels . tracksDropdown . visible = false ;
66
+
67
+ this . panels . endOfRunButton . visible = false ;
68
+ this . panels . syncTrackButton . visible = false ;
66
69
}
67
70
68
71
onTimesUpdated ( count : number ) {
@@ -201,18 +204,13 @@ class LeaderboardsHandler {
201
204
* Hide the button to go to the end of run page.
202
205
*/
203
206
onMapLoad ( isOfficial : boolean ) {
204
- this . panels . endOfRunButton . visible = false ;
205
- this . panels . syncTrackButton . visible = false ;
206
-
207
207
if ( isOfficial ) {
208
208
return ; // Load official leaderboard tracks instead
209
209
}
210
210
211
211
// Try to load tracks from local zones
212
212
const mapZoneData = MomentumTimerAPI . GetActiveZoneDefs ( ) ;
213
213
if ( mapZoneData ) {
214
- this . panels . syncTrackButton . visible = true ;
215
-
216
214
// Main track
217
215
{
218
216
const trackStr = $ . Localize ( '#Leaderboards_Tracks_Main' ) ;
@@ -299,6 +297,11 @@ class LeaderboardsHandler {
299
297
return ;
300
298
}
301
299
300
+ // Allow player to sync their current track to the value selected in the dropdown
301
+ if ( this . panels . cp . id === 'TabMenuLeaderboards' ) {
302
+ this . panels . syncTrackButton . visible = true ;
303
+ }
304
+
302
305
this . panels . tracksDropdown . visible = true ;
303
306
this . panels . tracksDropdown . SetSelectedIndex ( 0 ) ;
304
307
this . panels . tracksDropdown . SetPanelEvent ( 'onuserinputsubmit' , ( ) => {
0 commit comments