private static void Postfix(OptionsMenu __instance, int col, string label, OptionsMenuButton.SelectedActionDelegate onSelected, OptionsMenuButton.IsCheckedDelegate isChecked) { if (__instance.mPage == OptionsMenu.Page.Main) { buttonCount++; if (buttonCount == 9) { SongDownloaderUI.AddPageButton(__instance, 0); } } }
internal static void StartNewPageSearch() { SongDownloaderUI.ResetScrollPosition(); MelonCoroutines.Start(DoSongWebSearch(searchString, (query, result) => { songlist = result; if (SongDownloaderUI.songItemPanel != null) { SongDownloaderUI.AddSongItems(SongDownloaderUI.songItemMenu, songlist); } }, SongDownloaderUI.difficultyFilter, SongDownloaderUI.popularity, page, false)); }
private static void Postfix(OptionsMenu __instance, int col, string label, OptionsMenuButton.SelectedActionDelegate onSelected, OptionsMenuButton.IsCheckedDelegate isChecked) { if (__instance.mPage == OptionsMenu.Page.Main) { buttonCount++; if (buttonCount == 9) { SongDownloaderUI.AddPageButton(__instance, 0); SongSearchScreen.SetMenu(__instance); PlaylistCreatePanel.SetMenu(__instance); PlaylistSelectPanel.SetMenu(__instance); PlaylistEditPanel.SetMenu(__instance); PlaylistEndlessPanel.SetMenu(__instance); } } }
public static IEnumerator StartSongSearchCoroutine(string search, string difficulty = null, int page = 1, bool total = false) { string webSearch = search == null || search == "" ? "" : "&search=" + WebUtility.UrlEncode(search); string webPage = page == 1 ? "" : "&page=" + page.ToString(); string webDifficulty = difficulty == "All" || difficulty == "" ? "" : "&" + difficulty.ToLower() + "=true"; string webCurated = SongDownloaderUI.curated ? "&curated=true" : ""; string webPlaycount = SongDownloaderUI.popularity ? "&sort=leaderboards" : ""; string concatURL = !total ? apiURL + webSearch + webDifficulty + webPage + webCurated + webPlaycount : "http://www.audica.wiki:5000/api/customsongs?pagesize=all"; WWW www = new WWW(concatURL); yield return(www); songlist = JSON.Load(www.text).Make <APISongList>(); if (SongDownloaderUI.songItemPanel != null) { SongDownloaderUI.AddSongItems(SongDownloaderUI.songItemMenu, songlist); } }