|
@@ -45,6 +45,7 @@ namespace SongBrowserPlugin
|
|
|
|
|
|
_songBrowserUI = gameObject.AddComponent<SongBrowserUI>();
|
|
|
_ppDownloader = gameObject.AddComponent<ScoreSaberDatabaseDownloader>();
|
|
|
+ _ppDownloader.onScoreSaberDataDownloaded += OnScoreSaberDataDownloaded;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -104,6 +105,24 @@ namespace SongBrowserPlugin
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
+ /// Inform browser score saber data is available.
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="loader"></param>
|
|
|
+ /// <param name="levels"></param>
|
|
|
+ private void OnScoreSaberDataDownloaded()
|
|
|
+ {
|
|
|
+ _log.Trace("OnScoreSaberDataDownloaded");
|
|
|
+ try
|
|
|
+ {
|
|
|
+ _songBrowserUI.UpdateSongList();
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ _log.Exception("Exception during OnSongLoaderLoadedSongs: ", e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
/// Get a handle to the view controllers we are going to add elements to.
|
|
|
/// </summary>
|
|
|
public void AcquireUIElements()
|