Пример #1
0
 private static void Postfix(InGameUI __instance, OptionsMenu.Page page)
 {
     if (page == OptionsMenu.Page.Main)
     {
         if (SongSearch.searchInProgress)
         {
             SongSearchScreen.GoToSearch();
         }
         else if (PlaylistManager.state == PlaylistManager.PlaylistState.Selecting || PlaylistManager.state == PlaylistManager.PlaylistState.Adding)
         {
             PlaylistSelectPanel.GoToPanel();
         }
         else if (PlaylistManager.state == PlaylistManager.PlaylistState.Endless)
         {
             PlaylistEndlessPanel.GoToPanel();
         }
     }
     if (page == OptionsMenu.Page.Misc)
     {
         if (PlaylistManager.state == PlaylistManager.PlaylistState.Creating)
         {
             PlaylistCreatePanel.GoToPanel();
         }
         else if (PlaylistManager.state == PlaylistManager.PlaylistState.Editing)
         {
             PlaylistEditPanel.GoToPanel();
         }
     }
 }
Пример #2
0
 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);
         }
     }
 }
Пример #3
0
 private static bool Prefix(OptionsMenu __instance)
 {
     // should always be on the search page when this happens
     if (SongSearch.searchInProgress)
     {
         SongSearch.CancelSearch();
         return(false);
     }
     else if (PlaylistManager.state == PlaylistManager.PlaylistState.Selecting || PlaylistManager.state == PlaylistManager.PlaylistState.Adding)
     {
         PlaylistSelectPanel.CancelSelect();
         return(false);
     }
     else if (PlaylistManager.state == PlaylistManager.PlaylistState.Creating)
     {
         PlaylistCreatePanel.CancelCreate();
     }
     else if (PlaylistManager.state == PlaylistManager.PlaylistState.Editing)
     {
         PlaylistEditPanel.CancelEdit();
     }
     else if (PlaylistManager.state == PlaylistManager.PlaylistState.Endless)
     {
         PlaylistEndlessPanel.CancelEndless();
     }
     else
     {
         if (SongDownloaderUI.songItemPanel != null)
         {
             SongDownloaderUI.songItemPanel.SetPageActive(false);
         }
         if (SongDownloader.needRefresh)
         {
             SongBrowser.ReloadSongList(false);
         }
     }
     return(true);
 }