public SoundSettingsScreen(Game i_Game) : base(i_Game, 150f, 15f) { int index = 0; this.m_Background = new Background(this, @"Sprites\BG_Space01_1024x768", 1); this.m_MenuHeader = new MenuHeader(this, @"Screens\Settings\SoundSettingsLogo"); this.m_SoundSettingManager = i_Game.Services.GetService(typeof(ISoundSettingsManager)) as ISoundSettingsManager; ToggleItem toggleGameSound = new ToggleItem(@"Screens\Settings\ToggleSound", @"Screens\Settings\OnOff_53x52", this, index++); VolumeItem bgMusicVolume = new VolumeItem(@"Screens\Settings\BgMusic", this, index++); VolumeItem soundEffectsVolume = new VolumeItem(@"Screens\Settings\SoundEffects", this, index++); ClickItem doneItem = new ClickItem("Done", @"Screens\Settings\Done", this, index++); toggleGameSound.ToggleValueChanched += new EventHandler <EventArgs>(this.m_SoundSettingManager.ToggleGameSound_Click); bgMusicVolume.IncreaseVolumeButtonClicked += new EventHandler <EventArgs>(this.m_SoundSettingManager.IncreaseBackgroundMusic_Click); bgMusicVolume.DecreaseVolumeButtonClicked += new EventHandler <EventArgs>(this.m_SoundSettingManager.DecreaseBackgroundMusic_Click); soundEffectsVolume.IncreaseVolumeButtonClicked += new EventHandler <EventArgs>(this.m_SoundSettingManager.IncreaseSoundEffects_Click); soundEffectsVolume.DecreaseVolumeButtonClicked += new EventHandler <EventArgs>(this.m_SoundSettingManager.DecreaseSoundEffects_Click); doneItem.ItemClicked += this.menuItem_Click; this.AddMenuItem(toggleGameSound); this.AddMenuItem(bgMusicVolume); this.AddMenuItem(soundEffectsVolume); this.AddMenuItem(doneItem); }
public MainMenuScreen(Game i_Game) : base(i_Game) { this.IsUsingKeyboard = true; this.m_Background = new Background(this, @"Sprites\BG_Space01_1024x768", 1); this.m_MenuHeader = new MenuHeader(this, @"Screens\MainMenu\MainMenuLogo"); this.m_MenuHeader.OffsetX = 20; int index = 0; ToggleItem playersItem = new ToggleItem(@"Screens\MainMenu\PlayersWhite", @"Screens\MainMenu\PlayersOptions_70x50", this, index++); playersItem.ToggleValueChanched += new EventHandler <EventArgs>(this.numOfPlayers_Changed); this.AddMenuItem(playersItem); ClickItem SettingsScreenItem = new ClickItem("ScreenSettingsScreen", @"Screens\MainMenu\ScreenSettings", this, index++); ClickItem SoundSettingsItem = new ClickItem("SoundSettingsScreen", @"Screens\MainMenu\SoundSettings", this, index++); ClickItem playItem = new ClickItem("PlayScreen", @"Screens\MainMenu\PlayGameWhite", this, index++); ClickItem QuitItem = new ClickItem("Quit", @"Screens\Wellcome\QuitGame", this, index++); SettingsScreenItem.ItemClicked += new EventHandler <ScreenEventArgs>(this.menuItem_Click); SoundSettingsItem.ItemClicked += new EventHandler <ScreenEventArgs>(this.menuItem_Click); playItem.ItemClicked += new EventHandler <ScreenEventArgs>(this.menuItem_Click); QuitItem.ItemClicked += new EventHandler <ScreenEventArgs>(this.buttonQuit_click); this.AddMenuItem(SettingsScreenItem); this.AddMenuItem(SoundSettingsItem); this.AddMenuItem(playItem); this.AddMenuItem(QuitItem); }
public LevelTransitionScreen(Game i_Game) : base(i_Game) { this.m_TextPosition = new Vector2((this.Game.GraphicsDevice.Viewport.Width / 2) - 50, (this.Game.GraphicsDevice.Viewport.Height / 2) - 100); this.m_Background = new Background(this, @"Sprites\BG_Space01_1024x768", 1); this.m_Background.TintColor = Color.Green; this.m_Counter = new MenuHeader(this, @"Screens/Numbers_210x25"); }
public PauseScreen(Game i_Game) : base(i_Game) { this.IsModal = true; this.IsOverlayed = true; this.UseGradientBackground = true; this.BlackTintAlpha = 0.4f; this.m_PauseMsg = new MenuHeader(this, @"Screens\Pause\PausedMessage"); this.m_PauseMsg.OffsetY = 250; }
public WelcomeScreen(Game i_Game) : base(i_Game) { this.IsUsingKeyboard = false; this.m_Background = new Background(this, @"Sprites\BG_Space01_1024x768", 1); this.m_MenuHeader = new MenuHeader(this, @"Screens\Wellcome\SpaceInvadersLogo", 0.8f); int index = 0; ClickItem playItem = new ClickItem("PlayScreen", @"Screens\Wellcome\PlayGame", this, index++); ClickItem mainMenuItem = new ClickItem("MainMenuScreen", @"Screens\Wellcome\MainMenu", this, index++); ClickItem QuitItem = new ClickItem("Quit", @"Screens\Wellcome\QuitGame", this, index++); playItem.ItemClicked += new EventHandler <ScreenEventArgs>(this.menuItem_Click); mainMenuItem.ItemClicked += new EventHandler <ScreenEventArgs>(this.menuItem_Click); QuitItem.ItemClicked += new EventHandler <ScreenEventArgs>(this.buttonQuit_click); this.AddMenuItem(playItem); this.AddMenuItem(mainMenuItem); this.AddMenuItem(QuitItem); }
public GameOverScreen(Game i_Game) : base(i_Game, 70f, 85f, 15f) { this.IsUsingKeyboard = false; this.m_Background = new Background(this, @"Sprites\BG_Space01_1024x768", 1); this.m_Background.TintColor = Color.Red; this.m_GameOverHeader = new MenuHeader(this, @"Screens\GameOver\GameOverLogo"); int index = 0; ClickItem QuitItem = new ClickItem("Quit", @"Screens\Wellcome\QuitGame", this, index++); ClickItem playItem = new ClickItem("PlayScreen", @"Screens\GameOver\Restart", this, index++); ClickItem mainMenuItem = new ClickItem("MainMenuScreen", @"Screens\Wellcome\MainMenu", this, index++); QuitItem.ItemClicked += new EventHandler <ScreenEventArgs>(this.buttonQuit_Click); playItem.ItemClicked += new EventHandler <ScreenEventArgs>(this.menuItem_Click); mainMenuItem.ItemClicked += new EventHandler <ScreenEventArgs>(this.menuItem_Click); this.AddMenuItem(QuitItem); this.AddMenuItem(playItem); this.AddMenuItem(mainMenuItem); }
public ScreenSettingsScreen(Game i_Game) : base(i_Game, 150f, 15f) { int index = 0; this.m_Background = new Background(this, @"Sprites\BG_Space01_1024x768", 1); this.m_MenuHeader = new MenuHeader(this, @"Screens\Settings\ScreenSettingsLogo"); this.m_ScreenSettingMng = i_Game.Services.GetService(typeof(IScreenSettingsManager)) as IScreenSettingsManager; ToggleItem mouseVisability = new ToggleItem(@"Screens\Settings\MouseVisability", @"Screens\Settings\VisibleInvisible_128x50", this, index++); ToggleItem windowResizing = new ToggleItem(@"Screens\Settings\AllowResizing", @"Screens\Settings\OnOff_53x52", this, index++, 1); ToggleItem fullScreen = new ToggleItem(@"Screens\Settings\FullScreenMode", @"Screens\Settings\OnOff_53x52", this, index++, 1); ClickItem doneItem = new ClickItem("Done", @"Screens\Settings\Done", this, index++); mouseVisability.ToggleValueChanched += new EventHandler <EventArgs>(this.mouseVisability_Changed); windowResizing.ToggleValueChanched += new EventHandler <EventArgs>(this.m_ScreenSettingMng.AllowWindowResizingConfigToggle_Click); fullScreen.ToggleValueChanched += new EventHandler <EventArgs>(this.m_ScreenSettingMng.FullScreenModeConfigToggle_Click); doneItem.ItemClicked += new EventHandler <ScreenEventArgs>(this.menuItem_Click); this.AddMenuItem(mouseVisability); this.AddMenuItem(windowResizing); this.AddMenuItem(fullScreen); this.AddMenuItem(doneItem); }