Ejemplo n.º 1
0
        public TResolutionOption(Game1.StructOptionsMain structOptionsMain, StructResolution structResolution)
        {
            //GRAPHICS
            this.graphics = structOptionsMain.Graphics;

            //TEXTURES
            this.txResolutionBar = structResolution.TxResolutionBar;
            this.txArrowLeft = structResolution.TxArrowLeft;
            this.txArrowRight = structResolution.TxArrowRight;

            //TEXTURES POSITIONS
            this.posResolutionBar = structResolution.PosResolutionBar;
            this.posArrowLeft = structResolution.PosArrowLeft;
            this.posArrowRight = structResolution.PosArrowRight;

            //TEXTURES SIZED
            this.sizeResolutionBar = structResolution.SizeResolutionBar;
            this.sizeArrow = structResolution.SizeArrow;
            this.sizeResolutionBar = structResolution.SizeResolutionBar;

            //COLOUR
            this.col = Color.White;

            //INITIALIZE
            this.temp = posResolutionBar;
            Init();
        }
Ejemplo n.º 2
0
        public void Init()
        {
            //STRUCT CHECKBOX
            structCheckBox = new StructCheckBox();
            graphics.PreferMultiSampling = structCheckBox.StateCheckBox;
            graphics.ApplyChanges();
            this.spriteFont = structOptionsMain.SpriteFont;

            //SONG CONFIG
            //song = Content.Load<Song>("Ismo_Kan_Niet_Hangen_Met_Je");
            //MediaPlayer.Play(song);
            MediaPlayer.Volume = 1f;

            //STRUCT SOUND
            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);

            //STRUCT RESOLUTION
            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);

            //STRUCT CHECKBOX
            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);

            //STRUCT OPTIONS TEXT
            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);

            //BACKGROUND
            bg = new Background(graphics.GraphicsDevice, Content);

            //INITIALIZE
            framesPassed = 0;
            selectedNumber = 0;
            tResolution.ChangeResolution(new Vector2(1024, 576));
        }