示例#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);
         }
     }
 }