private static void Postfix(MenuState __instance, ref MenuState.State state) { if (state == MenuState.State.LaunchPage) { DeleteButton.CreateDeleteButton(); FavoriteButtonButton.CreateFavoriteButtonButton(); DifficultyDisplay.Show(); } else { DifficultyDisplay.Hide(); } if (state == MenuState.State.SongPage) { ScoreDisplayList.Show(); } else { ScoreDisplayList.Hide(); } if (state == MenuState.State.SongPage) { RandomSong.CreateRandomSongButton(); } }
private static void Postfix(SongSelect __instance, ref bool extras, ref Il2CppSystem.Collections.Generic.List <string> __result) { FilterPanel.ApplyFilter(__instance, ref extras, ref __result); if (SongBrowser.deletedSongs.Count > 0) { foreach (var deletedSong in SongBrowser.deletedSongs) { __result.Remove(deletedSong); } } RandomSong.UpdateAvailableSongs(__result); }
public static void AddFavorite(string songID) { var song = SongList.I.GetSong(songID); if (!song.extrasSong) { return; } if (favorites.songIDs.Contains(songID)) { RandomSong.FavouritesChanged(songID, false); favorites.songIDs.Remove(songID); SongBrowser.DebugText($"Removed {song.title} from favorites!"); SaveFavorites(); } else { RandomSong.FavouritesChanged(songID, true); favorites.songIDs.Add(songID); SongBrowser.DebugText($"Added {song.title} to favorites!"); SaveFavorites(); } }
private static void OnRandomSongButtonShot() { RandomSong.SelectRandomSong(); }
private void LoadConfig() { RandomSong.LoadBagSize(MelonPrefs.GetInt("RandomSong", "RandomSongBagSize")); lastSongCount = MelonPrefs.GetInt("SongBrowser", "LastSongCount"); }