daily pastebin goal
57%
SHARE
TWEET

Untitled

a guest Dec 9th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void InsertPattern()
  2.             {
  3.                 List<Menu.MenuOption> MenOpt=new List<Menu.MenuOption>();
  4.                 int ct = -1;
  5.                 foreach(Song.Pattern pat in MainCore.CurrentSong.Channels[(int)MainCore.CurrentSong.CursorPos.Y].Patterns)
  6.                 {
  7.                     ct++;
  8.                   MenOpt.Add(
  9.                       new Menu.MenuOption(pat.Name, InsertPatternFromMenu, ct)
  10.                      
  11.                       );
  12.                 }
  13.                 MenOpt.Add(new Menu.MenuOption("Cancel", null, 0));
  14.  
  15.                 Screen MenuScreen = new Menu("Menu", MenOpt);
  16.  
  17.                 MainCore.AddScreens.Add(MenuScreen);
  18.                 MainCore.ControllingScreen = MenuScreen;
  19.  
  20.             }
  21.  
  22.         }
  23.  
  24.         public static void InsertPatternFromMenu(int pat)
  25.         {
  26.             Song.Pattern pt = MainCore.CurrentSong.Channels[(int)MainCore.CurrentSong.CursorPos.Y].Patterns[pat];
  27.             InsertPattern(pt, (int)MainCore.CurrentSong.CursorPos.X, (int)MainCore.CurrentSong.CursorPos.Y);
  28.         }
  29.  
  30.         public static void InsertPattern(Song.Pattern pat, int X, int Y)
  31.         {
  32.             MainCore.CurrentSong.Channels[Y].SetSequence(X, pat);
  33.  
  34.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top