Ejemplo n.º 1
0
        public override void Initialize()
        {
            //AddBackground("settingsmenu");
            ButtonArea returnButton = new ButtonArea();

            returnButton.AddImage("return");
            returnButton.Position = new Vector2(83, 390);
            returnButton.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <StartMenuScreen>()));
            returnButton.HasShortcutWithGoBackButton = true;
            AddButtonArea(returnButton);
            ButtonArea graphicsMenuButton = new ButtonArea();

            graphicsMenuButton.AddImage("settingsmenu_graphics");
            graphicsMenuButton.Position = new Vector2(83, 540);
            graphicsMenuButton.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <GraphicsMenuScreen>()));
            AddButtonArea(graphicsMenuButton);
            ButtonArea soundMenuButton = new ButtonArea();

            soundMenuButton.AddImage("settingsmenu_sound");
            soundMenuButton.Position = new Vector2(83, 690);
            soundMenuButton.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <SoundMenuScreen>()));
            AddButtonArea(soundMenuButton);
            ButtonArea controlsMenuButton = new ButtonArea();

            controlsMenuButton.AddImage("settingsmenu_controls");
            controlsMenuButton.Position = new Vector2(83, 840);
            controlsMenuButton.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <ControlsMenuScreen>()));
            AddButtonArea(controlsMenuButton);
            SetFocusedButtonArea(returnButton);
            base.Initialize();
        }
Ejemplo n.º 2
0
 public virtual void AddScrollDown(ButtonArea buttonArea)
 {
     buttonArea.SetContentManager(_contentManager);
     buttonArea.SetInputChecker(_inputChecker);
     buttonArea.SetButtonSelectAction(new ScrollDownAction());
     buttonArea.HasShortcutWithMouseWheelDown = true;
     _buttonAreaList.AddScrollDown(buttonArea);
 }
Ejemplo n.º 3
0
 public override void Initialize()
 {
     AddBackground("controlsmenu");
     ButtonArea returnButton = new ButtonArea();
     returnButton.AddImage("return");
     returnButton.Position = new Vector2(83, 390);
     returnButton.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen<SettingsMenuScreen>()));
     returnButton.HasShortcutWithGoBackButton = true;
     AddButtonArea(returnButton);
     base.Initialize();
 }
Ejemplo n.º 4
0
        public override void Initialize()
        {
            //AddBackground("soundmenu");
            ButtonArea returnButton = new ButtonArea();

            returnButton.AddImage("return");
            returnButton.Position = new Vector2(83, 390);
            returnButton.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <SettingsMenuScreen>()));
            returnButton.HasShortcutWithGoBackButton = true;
            AddButtonArea(returnButton);
            _masterVolumeButton.AddImage("soundmenu_mastervolume");
            _masterVolumeButton.AddImage("slider_bar", ButtonAreaImageNameTypeEnum.Actual, ButtonAreaImagePositioningEnum.ValueHorizontalSlider, ButtonAreaImageStackDirectionEnum.None);
            _masterVolumeButton.AddImage("slider");
            _masterVolumeButton.AddImage(";", ButtonAreaImageNameTypeEnum.Character);
            _masterVolumeButton.Position          = new Vector2(83, 540);
            _masterVolumeButton.SliderBorderLeft  = 24;
            _masterVolumeButton.SliderBorderRight = 24;

            //_masterVolumeButton.SetButtonSelectAction(new ChangeValueButtonAction(_masterVolumeButton, 1, 0));
            //_masterVolumeButton.SetButtonAlternateSelectAction(new ChangeValueButtonAction(_masterVolumeButton, -1, 0));
            AddButtonArea(_masterVolumeButton);
            _musicVolumeButton.AddImage("soundmenu_musicvolume");
            _musicVolumeButton.AddImage("slider_bar", ButtonAreaImageNameTypeEnum.Actual, ButtonAreaImagePositioningEnum.ValueHorizontalSlider, ButtonAreaImageStackDirectionEnum.None);
            _musicVolumeButton.AddImage("slider");
            _musicVolumeButton.AddImage(";", ButtonAreaImageNameTypeEnum.Character);
            _musicVolumeButton.Position          = new Vector2(83, 690);
            _musicVolumeButton.SliderBorderLeft  = 24;
            _musicVolumeButton.SliderBorderRight = 24;
            //_musicVolumeButton.SetButtonSelectAction(new ChangeValueButtonAction(_musicVolumeButton, 1, 0));
            //_musicVolumeButton.SetButtonAlternateSelectAction(new ChangeValueButtonAction(_musicVolumeButton, -1, 0));
            AddButtonArea(_musicVolumeButton);
            ButtonArea applyButton = new ButtonArea();

            applyButton.AddImage("apply_settings");
            applyButton.Position = new Vector2(83, 840);
            //applyButton.SetButtonAction(new ApplySettingFromRollingStateButtonAction(_fullscreenButton, _resolutionButton));
            AddButtonArea(applyButton);
            SetFocusedButtonArea(returnButton);
            base.Initialize();
        }
Ejemplo n.º 5
0
        public override void Initialize()
        {
            //AddBackground("graphicsmenu");
            ButtonArea returnButton = new ButtonArea();

            returnButton.AddImage("return");
            returnButton.Position = new Vector2(83, 390);
            returnButton.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <SettingsMenuScreen>()));
            returnButton.HasShortcutWithGoBackButton = true;
            AddButtonArea(returnButton);
            _fullscreenButton.AddRollingState("true");
            _fullscreenButton.AddRollingState("false");
            _fullscreenButton.AddImage("graphicsmenu_fullscreen");
            _fullscreenButton.AddImage("graphicsmenu_fullscreen_true_or_false", ButtonAreaImageNameTypeEnum.RollingState);
            _fullscreenButton.Position = new Vector2(83, 540);
            _fullscreenButton.SetButtonSelectAction(new NextRollingStateButtonAction(_fullscreenButton));
            _fullscreenButton.SetButtonAlternateSelectAction(new PreviousRollingStateButtonAction(_fullscreenButton));
            AddButtonArea(_fullscreenButton);
            foreach (DisplayMode displayMode in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes)
            {
                _resolutionButton.AddRollingState(string.Format("{0:D}x{1:D};", displayMode.Width, displayMode.Height));
            }
            _resolutionButton.AddImage("graphicsmenu_resolution");
            _resolutionButton.AddImage("graphicsmenu_resolution_width_x_height", ButtonAreaImageNameTypeEnum.RollingStateCharacter);
            _resolutionButton.Position = new Vector2(83, 690);
            _resolutionButton.SetButtonSelectAction(new NextRollingStateButtonAction(_resolutionButton));
            _resolutionButton.SetButtonAlternateSelectAction(new PreviousRollingStateButtonAction(_resolutionButton));
            AddButtonArea(_resolutionButton);
            ButtonArea applyButton = new ButtonArea();

            applyButton.AddImage("apply_settings");
            applyButton.Position = new Vector2(83, 840);
            applyButton.SetButtonSelectAction(new ApplySettingFromRollingStateButtonAction(_fullscreenButton, _resolutionButton));
            AddButtonArea(applyButton);
            SetFocusedButtonArea(returnButton);
            base.Initialize();
        }
        public override void Initialize()
        {
            AddBackground("startmenu");
            ButtonArea continueGameButton = new ButtonArea();

            continueGameButton.AddImage("startmenu_continue");
            continueGameButton.Position = new Vector2(83, 414);
            continueGameButton.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <GameScreen>()));
            AddButtonArea(continueGameButton);
            ButtonArea loadGameButton = new ButtonArea();

            loadGameButton.AddImage("startmenu_load");
            loadGameButton.Position = new Vector2(83, 519);
            loadGameButton.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <LoadMenuScreen>()));
            AddButtonArea(loadGameButton);
            ButtonArea newGameButton = new ButtonArea();

            newGameButton.AddImage("startmenu_new");
            newGameButton.Position = new Vector2(83, 655);
            newGameButton.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <GameScreen>()));
            AddButtonArea(newGameButton);
            ButtonArea settingsButton = new ButtonArea();

            settingsButton.AddImage("startmenu_settings");
            settingsButton.Position = new Vector2(83, 790);
            settingsButton.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <SettingsMenuScreen>()));
            AddButtonArea(settingsButton);
            ButtonArea exitButton = new ButtonArea();

            exitButton.AddImage("startmenu_exit");
            exitButton.Position = new Vector2(83, 905);
            exitButton.SetButtonSelectAction(new ExitToDesktopButtonAction());
            //exitButton.HasShortcutWithGoBackButton = true;
            AddButtonArea(exitButton);
            SetFocusedButtonArea(continueGameButton);
            base.Initialize();
        }
        public override void Initialize()
        {
            //AddBackground("loadmenu");
            ButtonArea returnButton = new ButtonArea();

            returnButton.AddImage("return");
            returnButton.Position = new Vector2(83, 120);
            returnButton.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <StartMenuScreen>()));
            returnButton.HasShortcutWithGoBackButton = true;
            AddButtonArea(returnButton);
            ButtonArea filelistButton1 = new ButtonArea();

            filelistButton1.AddImage("loadmenu_snapshot");
            filelistButton1.AddImage("0");
            filelistButton1.AddImage("1");
            filelistButton1.AddImage("end_paranteses");
            filelistButton1.Position = new Vector2(83, 270);
            filelistButton1.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <GameScreen>()));
            AddButtonArea(filelistButton1);
            ButtonArea filelistButton2 = new ButtonArea();

            filelistButton2.AddImage("loadmenu_snapshot");
            filelistButton2.AddImage("0");
            filelistButton2.AddImage("2");
            filelistButton2.AddImage("end_paranteses");
            filelistButton2.Position = new Vector2(83, 420);
            filelistButton2.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <GameScreen>()));
            AddButtonArea(filelistButton2);
            ButtonArea filelistButton3 = new ButtonArea();

            filelistButton3.AddImage("loadmenu_snapshot");
            filelistButton3.AddImage("0");
            filelistButton3.AddImage("3");
            filelistButton3.AddImage("end_paranteses");
            filelistButton3.Position = new Vector2(83, 570);
            filelistButton3.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <GameScreen>()));
            AddButtonArea(filelistButton3);
            ButtonArea filelistButton4 = new ButtonArea();

            filelistButton4.AddImage("loadmenu_snapshot");
            filelistButton4.AddImage("0");
            filelistButton4.AddImage("4");
            filelistButton4.AddImage("end_paranteses");
            filelistButton4.Position = new Vector2(83, 720);
            filelistButton4.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <GameScreen>()));
            AddButtonArea(filelistButton4);
            ButtonArea filelistButton5 = new ButtonArea();

            filelistButton5.AddImage("loadmenu_snapshot");
            filelistButton5.AddImage("0");
            filelistButton5.AddImage("5");
            filelistButton5.AddImage("end_paranteses");
            filelistButton5.Position = new Vector2(83, 870);
            filelistButton5.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <GameScreen>()));
            AddButtonArea(filelistButton5);
            ButtonArea filelistButton6 = new ButtonArea();

            filelistButton6.AddImage("loadmenu_snapshot");
            filelistButton6.AddImage("0");
            filelistButton6.AddImage("6");
            filelistButton6.AddImage("end_paranteses");
            filelistButton6.Position = new Vector2(83, 1020);
            filelistButton6.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <GameScreen>()));
            AddButtonArea(filelistButton6);
            ButtonArea filelistButton7 = new ButtonArea();

            filelistButton7.AddImage("loadmenu_snapshot");
            filelistButton7.AddImage("0");
            filelistButton7.AddImage("7");
            filelistButton7.AddImage("end_paranteses");
            filelistButton7.Position = new Vector2(83, 1170);
            filelistButton7.SetButtonSelectAction(new ChangeScreenButtonAction(_screenManager.GetScreen <GameScreen>()));
            AddButtonArea(filelistButton7);

            ButtonArea scrollUpButton = new ButtonArea();

            scrollUpButton.AddImage("loadmenu_up");
            scrollUpButton.Position = new Vector2(83, 0);
            AddScrollUp(scrollUpButton);
            ButtonArea scrollDownButton = new ButtonArea();

            scrollDownButton.AddImage("loadmenu_down");
            scrollDownButton.Position = new Vector2(83, 870);
            AddScrollDown(scrollDownButton);

            SetScrollable(true);
            SetFocusedAtEnterButtonArea(returnButton);
            base.Initialize();
        }