コード例 #1
0
 public Button(GameMenu parentMenu, Texture2D image, int xCoord, int yCoord, int width, int height)
 {
     this.parentMenu = parentMenu;
     this.buttonImage = image;
     this.xCoord = xCoord;
     this.yCoord = yCoord;
     this.width = width;
     this.height = height;
 }
コード例 #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="menu"></param>
 public void AddMenu(Menus menu)
 {
     switch (menu)
     {
         case Menus.MainMenu:
             GameMenu tempMenu = new GameMenu(masterGame, content.Load<Texture2D>("Menus//menuMain"));
             tempMenu.AddButton(new SinglePlayerButton(tempMenu, content.Load<Texture2D>("Menus//Buttons/buttonSinglePlayer"), 350, 200, 100, 50));
             gameMenus.Add(tempMenu);
             break;
         case Menus.MultiPlayerCreationMenu:
             break;
         case Menus.MultiPlayerLobbyMenu:
             break;
         case Menus.MultiPlayerSelectionMenu:
             break;
         case Menus.SinglePlayerMenu:
             break;
     }
 }
コード例 #3
0
 public SinglePlayerButton(GameMenu parentMenu, Texture2D image, int xCoord, int yCoord, int width, int height)
     : base(parentMenu, image, xCoord, yCoord, width, height)
 {
 }