Example #1
0
        public TSoundOption(StructOptionsMain structOptionsMain, StructSound structSound)
        {
            this.graphics = structOptionsMain.Graphics;

            this.txSoundBar = structSound.TxSoundBar;
            this.txBarCursor = structSound.TxSoundBarCursor;
            this.txArrowLeft = structSound.TxArrowLeft;
            this.txArrowRight = structSound.TxArrowRight;

            this.posSoundBar = structSound.PosSoundBar;
            this.posArrowLeft = structSound.PosArrowLeft;
            this.posArrowRight = structSound.PosArrowRight;

            this.sizeSoundBar = structSound.SizeSoundBar;
            this.sizeBarCursor = structSound.SizeSoundBarCursor;
            this.sizeArrow = structSound.SizeArrow;

            this.col = Color.White;
            barCursorHeigthFloat = posSoundBar.Y += 0.30f;
            MakeResolutionArray();
            Init();
        }
Example #2
0
        public void Init()
        {
            structCheckBox = new StructCheckBox();
            graphics.PreferMultiSampling = structCheckBox.StateCheckBox;
            graphics.ApplyChanges();
            song = Content.Load<Song>("Ismo_Kan_Niet_Hangen_Met_Je");
            MediaPlayer.Play(song);
            MediaPlayer.Volume = 1f;
            this.spriteFont = structOptionsMain.SpriteFont;

            strucSound = new StructSound();

            strucSound.PosArrowLeft = new Vector2(2.64f, 3.17f);
            strucSound.TxSoundBar = Content.Load<Texture2D>("SoundBar");
            strucSound.TxSoundBarCursor = Content.Load<Texture2D>("SoundBarCursor");
            strucSound.TxArrowLeft = Content.Load<Texture2D>("ArrowLeft");
            strucSound.TxArrowRight = Content.Load<Texture2D>("ArrowRight");
            strucSound.PosSoundBar = new Vector2(2.34f, 2.6f);
            strucSound.PosSoundBarCursor = new Vector2(1.77f, 3.30f);
            strucSound.PosArrowLeft = new Vector2(2.65f, 3.17f);
            strucSound.PosArrowRight = new Vector2(1.53f, 3.17f);
            strucSound.SizeArrow = new Vector2(43, 35);
            strucSound.SizeSoundBar = new Vector2(200, 10);
            strucSound.SizeSoundBarCursor = new Vector2(22, 35);

            tSound = new TSoundOption(structOptionsMain, strucSound);

            structResolution = new StructResolution();
            structResolution.TxResolutionBar = Content.Load<Texture2D>("ResolutionBar");
            structResolution.TxArrowLeft = Content.Load<Texture2D>("ArrowLeft");
            structResolution.TxArrowRight = Content.Load<Texture2D>("ArrowRight");
            structResolution.PosArrowLeft = new Vector2(2.65f, 2.5f);
            structResolution.PosArrowRight = new Vector2(1.53f, 2.5f);
            structResolution.PosResolutionBar = new Vector2(2.35f, 2.5f);
            structResolution.SizeArrow = new Vector2(43, 35);
            structResolution.SizeResolutionBar = new Vector2(200, 35);
            tResolution = new TResolutionOption(structOptionsMain, structResolution);
            //R.I.P. -> tResolution = new TResolutionOption(graphics, txResolutionBar, txArrowLeft, txArrowRight, posResolutionBar, sizeResolutionBar, posArrowLeft, posArrowRight, sizeArrow, Color.White);

            structCheckBox.TxCheckedBox = Content.Load<Texture2D>("CheckboxTrue");
            structCheckBox.TxUnCheckedBox = Content.Load<Texture2D>("CheckboxFalse");
            structCheckBox.PosCheckBoxLeft = new Vector2(2.63f, 2);
            structCheckBox.PosCheckBoxRight = new Vector2(1.67f, 2);
            structCheckBox.VecSizeCheckBox = new Vector2(35, 35);
            cbAlias = new TCheckBoxOption(structOptionsMain, structCheckBox);
            //R.I.P. -> cbAlias = new TCheckBoxOption(graphics, checkedBox, unCheckedBox, posCheckBoxLeft, posCheckBoxRight, vecSizeCheckBox, stateCheckBox, Color.White);

            structOptionsText.TxBackground = Content.Load<Texture2D>("OptionsBG");

            structOptionsText.TxBack = Content.Load<Texture2D>("Back");
            structOptionsText.TxKeybindings = Content.Load<Texture2D>("Keybindings");
            structOptionsText.TxSelectArrow = Content.Load<Texture2D>("SelectArrow");
            structOptionsText.TextHeader = "JUST ANOTHER OPTIONS MENU";
            structOptionsText.TextSound = "SOUND";
            structOptionsText.TextResolution = "RESOLUTION";
            structOptionsText.TextAlias = "ANTI ALIASING";
            structOptionsText.TextAliasOn = "ON";
            structOptionsText.TextAliasOff = "OFF";
            structOptionsText.PosBack = new Vector2(2.1f, 1.5f);
            structOptionsText.PosKeybindings = new Vector2(2.3f, 1.7f);
            structOptionsText.PosHeader = new Vector2(2.9f, 5f);
            structOptionsText.PosSelectArrow = new Vector2(22f, 3.3f);
            structOptionsText.PosSound = new Vector2(3.80f, 3.2f);
            structOptionsText.PosResolution = new Vector2(5.8f, 2.5f);
            structOptionsText.PosAlias = new Vector2(8.3f, 2f);
            structOptionsText.PosAliasOn = new Vector2(2.35f, 2f);
            structOptionsText.PosAliasOff = new Vector2(1.55f, 2f);
            structOptionsText.SizeBack = new Vector2(65, 20);
            structOptionsText.SizeKeybindings = new Vector2(172, 20);
            structOptionsText.SizeSelectArrow = new Vector2(46, 46);
            oText = new OptionsText(structOptionsMain, structOptionsText);
            //R.I.P. -> oText = new OptionsText(graphics, txBackground, txBack, posBack, sizeBack, txSelectArrow, posSelectArrow, sizeSelectArrow, spriteFont, textHeader, posHeader, textSound, posSound, textResolution, posResolution, textAlias, posAlias, textAliasOn, posAliasOn, textAliasOff, posAliasOff, Color.White);
            framesPassed = 0;
            selectedNumber = 0;
            tResolution.ChangeResolution(new Vector2(1024, 576));
            bg = new Background(graphics.GraphicsDevice, Content);
        }