spaceconquest.OptionsScreen.OptionsScreen C# (CSharp) Method

OptionsScreen() public method

public OptionsScreen ( GameScreen s ) : System
s GameScreen
return System
        public OptionsScreen(GameScreen s)
        {
            gameScreen = s;
            buttons = new List<MenuButton>();

            //Music Option Buttons
            int SoundX = 125;
            int SoundY = 200;
            soundBarPos = new Vector2(SoundX, SoundY - 50);
            buttons.Add(new MenuButton(new Rectangle(SoundX, 100, 150, 40), "Music ", OnOffSoundVolume));
            buttons.Add(new MenuButton(new Rectangle(SoundX, 200, 150, 40), "Volume + ", IncreaseSoundVolume));
            buttons.Add(new MenuButton(new Rectangle(SoundX, 250, 150, 40), "Volume - ", DecreaseSoundVolume));
            buttons.Add(new MenuButton(new Rectangle(SoundX, 300, 150, 40), "Next Track ", PlayNextTrack));

            //Sound Option Buttons
            int EffectX = 350;
            int EffectY = 200;
            effectBarPos = new Vector2(EffectX, EffectY - 50);
            buttons.Add(new MenuButton(new Rectangle(EffectX, 100, 150, 40), "Effects", OnOffEffectVolume));
            buttons.Add(new MenuButton(new Rectangle(EffectX, 200, 150, 40), "Volume + ", IncreaseEffectVolume));
            buttons.Add(new MenuButton(new Rectangle(EffectX, 250, 150, 40), "Volume - ", DecreaseEffectVolume));

            //Back button
            buttons.Add(new MenuButton(new Rectangle(125, 550, 150, 40), "Back ", MenuManager.ClickPrevScreen));
            if (gameScreen != null)
            {
                buttons.Add(new MenuButton(new Rectangle(125, 450, 150, 40), "Save Game", SaveGameScreen));
            }

            volBarTexture = new Texture2D(Game1.device, 1, 1, true, SurfaceFormat.Color);
            volBarTexture.SetData(new[] { volBarColor });
        }