Exemplo n.º 1
0
        public LoadSaveScreen(ContentManager content, bool load) : base(new AButton[]
        {
            new MenuButton(content,
                           700,
                           660,
                           100,
                           50,
                           new[] { Properties.LoadSaveScreen.Back },
                           new List <Screen> { Screen.InGameMenu },
                           new List <Screen> { Screen.LoadScreen, Screen.SaveScreen })
        })
        {
            mBackground = new GameHudText(content, 600, 50, 300, 700, new string[0]);

            mFiles = new[]
            {
                new GameHudButton(content, 700, 80, 100, 100, new[] { Properties.LoadGameMenu.File1 }),
                new GameHudButton(content, 700, 200, 100, 100, new[] { Properties.LoadGameMenu.File2 }),
                new GameHudButton(content, 700, 320, 100, 100, new[] { Properties.LoadGameMenu.File3 }),
                new GameHudButton(content, 700, 440, 100, 100, new[] { Properties.LoadGameMenu.File4 })
            };

            mBack           = new GameHudButton(content, 700, 680, 100, 50, new[] { Properties.LoadGameMenu.Back });
            mLoadSaveAction = load
                ? (Action <string>)(str => LoadAndSaveManager.Current.LoadGame(str))
                : str => LoadAndSaveManager.Current.SaveGame(str);
            mThisScreen = load ? Screen.LoadScreen : Screen.SaveScreen;
        }
Exemplo n.º 2
0
 public InGameMenu(ContentManager content, Camera camera)
 {
     mInGameMenu           = new GameHudText(content, 600, 200, 300, 500, new[] { "" });
     mLoadButton           = new GameHudButton(content, 620, 250, 260, 50, new[] { Properties.InGameMenu.LoadGame });
     mSaveButton           = new GameHudButton(content, 620, 320, 260, 50, new[] { Properties.InGameMenu.SaveGame });
     mGraphicsButton       = new GameHudButton(content, 620, 390, 260, 50, new[] { Properties.InGameMenu.GraphicSettings });
     mSoundButton          = new GameHudButton(content, 620, 460, 260, 50, new[] { Properties.InGameMenu.SoundSettings });
     mBackToMainMenuButton = new GameHudButton(content, 620, 530, 260, 50, new[] { Properties.InGameMenu.BackToMainMenu });
     mBackToGameButton     = new GameHudButton(content, 620, 600, 260, 50, new[] { Properties.InGameMenu.BackToGame });
     mCamera = camera;
 }