public override void LoadContent() { background = Globals.content.Load <Texture2D>("Menues/MainMenu/GameSettingsMenu/game-settings-menu-background"); gameDifficultyTextLabel = new MenuLabel( Globals.content.Load <SpriteFont>("Fonts/arial-40"), new Vector2(1920 / 2, 240), "Game Difficulty", Color.Black ); labelList.Add(gameDifficultyTextLabel); gameplayDifficultySelection = new MenuButtonSideScroll( new Vector2(1920 / 2 - MenuButton.buttonSize.X / 2, 310 - MenuButton.buttonSize.Y / 2), this, MenuButton.buttonSize, GameplaySettingsManager.gameplayDifficultiesFriendlyStrings, (int)GameplaySettingsManager.currentGameplayDifficulty ); buttonList.Add(gameplayDifficultySelection); beginGameButton = new MenuButton( new Vector2(1920 / 2 - MenuButton.buttonSize.X / 2 - 15, 420 - MenuButton.buttonSize.Y / 2 - 5), this, MenuButton.buttonSize + new Vector2(30, 10), "Begin Game", Globals.content.Load <SpriteFont>("Fonts/arial-bold-40") ); buttonList.Add(beginGameButton); }
public MenuButton(Vector2 _position, MenuScreen _menuScreen, Vector2 _size, string _buttonText, Texture2D _texture) : base(_position, _menuScreen, _size, buttonSize) { texture = _texture; buttonTextLabel = new MenuLabel( Globals.content.Load <SpriteFont>("Fonts/arial-bold-28"), new Vector2(_position.X + _size.X / 2, _position.Y + _size.Y / 2), _buttonText, CustomColors.veryLightOrange ); }
public MenuButton(Vector2 _position, MenuScreen _menuScreen, Vector2 _size, string _buttonText, SpriteFont font) : base(_position, _menuScreen, _size, buttonSize) { texture = Globals.content.Load <Texture2D>("Menues/MenuHelpers/menu-button-blank"); buttonTextLabel = new MenuLabel( font, new Vector2(_position.X + _size.X / 2, _position.Y + _size.Y / 2), _buttonText, CustomColors.veryLightOrange ); }
public override void LoadContent() { menuBackground = Globals.content.Load <Texture2D>("Menues/PauseMenu/pause-menu-background"); downArrow = Globals.content.Load <Texture2D>("Menues/MenuHelpers/scroll-menu-arrow"); upArrow = Globals.content.Load <Texture2D>("Menues/MenuHelpers/scroll-menu-arrow"); titleFont = Globals.content.Load <SpriteFont>("Fonts/arial-bold-40"); titleLabel = new MenuLabel(titleFont, new Vector2(Resolution.getVirtualResolution().X / 2, (Resolution.getVirtualResolution().Y - menuSize.Y + titleSize.Y + menuPadding) / 2), titleString, Color.White); }
public override void LoadContent() { menuBackground = Globals.content.Load <Texture2D>("Menues/PauseMenu/pause-menu-background"); Vector2 buttonSize = new Vector2(400, 80); musicVolumeLabel = new MenuLabel( Globals.content.Load <SpriteFont>("Fonts/arial-bold-28"), new Vector2(ResolutionConfig.virtualResolution.Item1 / 2, 420), MusicVolumeLabelText(), CustomColors.veryLightOrange ); soundEffectsVolumeLabel = new MenuLabel( Globals.content.Load <SpriteFont>("Fonts/arial-bold-28"), new Vector2(ResolutionConfig.virtualResolution.Item1 / 2, 550), SoundEffectVolumeLabelText(), CustomColors.veryLightOrange ); musicVolumeSlider = new MenuSlider(new Vector2(660, 450), this, AudioConfig.musicVolume); soundEffectsVolumeSlider = new MenuSlider(new Vector2(660, 580), this, AudioConfig.soundEffectVolume); soundEffectsVolumeSlider.soundEffectOnSliderChange = true; applyChangesButton = new MenuButton( new Vector2(760, 680), this, buttonSize, "Apply Changes" ); backButton = new MenuButton( new Vector2(760, 780), this, buttonSize, "Back" ); labelList.Add(musicVolumeLabel); labelList.Add(soundEffectsVolumeLabel); buttonList.Add(musicVolumeSlider); buttonList.Add(soundEffectsVolumeSlider); buttonList.Add(applyChangesButton); buttonList.Add(backButton); }
public override void LoadContent() { resolutionSelectionMenu = new ResolutionSelectionMenu(this); menuBackground = Globals.content.Load <Texture2D>("Menues/PauseMenu/pause-menu-background"); fullScreenCheckedTexture = Globals.content.Load <Texture2D>("Menues/MenuHelpers/menu-button-blank-checked"); fullScreenUncheckedTexture = Globals.content.Load <Texture2D>("Menues/MenuHelpers/menu-button-blank-unchecked"); Vector2 buttonSize = new Vector2(400, 80); resolutionLabel = new MenuLabel( Globals.content.Load <SpriteFont>("Fonts/arial-bold-40"), new Vector2(ResolutionConfig.virtualResolution.Item1 / 2, 540), ResolutionConfig.GetCurrentResolution().Item1 + " x " + ResolutionConfig.GetCurrentResolution().Item2, Color.White ); resolutionButton = new MenuButton( new Vector2(760, 430), this, buttonSize, "Resolution" ); fullScreenButton = new MenuButton( new Vector2(760, 580), this, buttonSize, "Full Screen", fullScreenUncheckedTexture ); applyChangesButton = new MenuButton( new Vector2(760, 680), this, buttonSize, "Apply Changes" ); backButton = new MenuButton( new Vector2(760, 780), this, buttonSize, "Back" ); labelList.Add(resolutionLabel); buttonList.Add(resolutionButton); buttonList.Add(fullScreenButton); buttonList.Add(applyChangesButton); buttonList.Add(backButton); subMenues.Add(resolutionSelectionMenu); LayoutVisualsToActualSettings(); foreach (MenuScreen subMenu in subMenues) { subMenu.LoadContent(); } }