コード例 #1
0
        public AboutScreen(Game1 eng) : base(eng)
        {
            int xCtr = 32, yCtr = 64;

            foreach (string s in buttonInfo)
            {
                string[]     fields = s.Split('|');
                ObjectButton b      = new ObjectButton(xCtr, yCtr, fields[1], fields[2], fields[3], fields[4]);
                stringToButton.Add(fields[0], b);
                buttons.Add(b);
                xCtr += 64;
                if (xCtr >= 448)
                {
                    xCtr  = 32;
                    yCtr += 64;
                }
            }
        }
コード例 #2
0
ファイル: AboutScreen.cs プロジェクト: ferg060129/Toggle
 public AboutScreen(Game1 eng)
     : base(eng)
 {
     int xCtr = 32, yCtr = 64;
     foreach(string s in buttonInfo)
     {
         string[]fields =  s.Split('|');
         ObjectButton b = new ObjectButton(xCtr, yCtr, fields[1], fields[2], fields[3], fields[4]);
         stringToButton.Add(fields[0], b);
         buttons.Add(b);
         xCtr += 64;
         if(xCtr >= 448)
         {
             xCtr = 32;
             yCtr += 64;
         }
     }
 }