Exemplo n.º 1
0
        public override void LoadContent()
        {
            #region Load Buttons
            Content.AddTexture2D("Buttons\\Menu\\NewGame", "Buttons-Menu-NewGame");
            Content.AddTexture2D("Buttons\\Menu\\NewGameSelected", "Buttons-Menu-NewGame_Selected");
            buttonNewGame = (ObjectButton)Objects.AddObject(ObjectPool.ObjectTypes.Button, "Buttons-Menu-NewGame", "Buttons-Menu-NewGame");
            buttonNewGame.X = 50;
            buttonNewGame.Y = 220;
            buttonNewGame.OnClick += new ObjectButton.OnClickDelegate(button_OnClick);

            Content.AddTexture2D("Buttons\\Menu\\Exit", "Buttons-Menu-Exit");
            Content.AddTexture2D("Buttons\\Menu\\ExitSelected", "Buttons-Menu-Exit_Selected");
            buttonExit = (ObjectButton)Objects.AddObject(ObjectPool.ObjectTypes.Button, "Buttons-Menu-Exit", "Buttons-Menu-Exit");
            buttonExit.X = 50;
            buttonExit.Y = 290;
            buttonExit.OnClick += new ObjectButton.OnClickDelegate(button_OnClick);
            #endregion
            //Load Cursor
            Content.AddTexture2D("Cursors\\Basic", "MenuCursor");
            cursor = (ObjectCursor)Objects.AddObject(ObjectPool.ObjectTypes.Cursor, "MenuCursor", "MenuCursor");
            #region Load Menu Backgrounds
            Content.AddTexture2D("Menu\\todesesser_menu_1080p", "menu1080p");
            Content.AddTexture2D("Menu\\todesesser_menu_900p", "menu900p");
            Content.AddTexture2D("Menu\\todesesser_menu_720p", "menu720p");
            Content.AddTexture2D("Menu\\todesesser_menu_800x600", "menu800x600");
            #endregion

            base.LoadContent();
        }
Exemplo n.º 2
0
 void button_OnClick(ObjectButton sender)
 {
     switch (sender.Key)
     {
         case "Buttons-Pause-Exit":
             GameData.GameState = GameData.GameStates.Exiting;
             break;
         case "Buttons-Pause-Resume":
             GameData.GameState = GameData.GameStates.Playing;
             break;
     }
 }
Exemplo n.º 3
0
        public override void LoadContent()
        {
            //Load Buttons
            Content.AddTexture2D("Buttons\\Menu\\Exit", "Buttons-Pause-Exit");
            Content.AddTexture2D("Buttons\\Menu\\ExitSelected", "Buttons-Pause-Exit_Selected");
            buttonExit = (ObjectButton)Objects.AddObject(ObjectPool.ObjectTypes.Button, "Buttons-Pause-Exit", "Buttons-Pause-Exit");
            buttonExit.X = 50;
            buttonExit.Y = 90;
            buttonExit.OnClick += new ObjectButton.OnClickDelegate(button_OnClick);

            Content.AddTexture2D("Buttons\\Pause\\Resume", "Buttons-Pause-Resume");
            Content.AddTexture2D("Buttons\\Pause\\ResumeSelected", "Buttons-Pause-Resume_Selected");
            buttonResume = (ObjectButton)Objects.AddObject(ObjectPool.ObjectTypes.Button, "Buttons-Pause-Resume", "Buttons-Pause-Resume");
            buttonResume.X = 50;
            buttonResume.Y = 20;
            buttonResume.OnClick += new ObjectButton.OnClickDelegate(button_OnClick);

            //Load Cursor
            Content.AddTexture2D("Cursors\\Basic", "PauseCursor");
            cursor = (ObjectCursor)Objects.AddObject(ObjectPool.ObjectTypes.Cursor, "PauseCursor", "PauseCursor");

            base.LoadContent();
        }