Ejemplo n.º 1
0
        private void Life()
        {
            Text lifes = new Text("LIFES", _font, 20);

            MainMenu.SetTextOriginToMiddle(lifes);
            lifes.Position = new Vector2D(-60, -3);

            Vector2D  lifesInputPosition = new Vector2D(100, 0);
            Textfield lifesInput         = new Textfield(lifesInputPosition, _textfieldSize, _font, 20, false, Program.lifes.ToString(), _window, true);

            GuiGroup lifeGroup = new GuiGroup(new Vector2D(0, _settingsDistances * 4));

            lifeGroup.AddDrawable(lifes);
            lifeGroup.AddDrawable(lifesInput);
            _textfields.Add(lifesInput);


            this.AddDrawable(lifeGroup);
        }
Ejemplo n.º 2
0
        private void Resolution()
        {
            Text resolutionX = new Text("RESOLUTION X", _font, 20);

            MainMenu.SetTextOriginToMiddle(resolutionX);
            resolutionX.Position = new Vector2D(-60, -3);

            Vector2D  resolutionXInputPosition = new Vector2D(100, 0);
            Textfield resolutionXInput         = new Textfield(resolutionXInputPosition, _textfieldSize, _font, 20, false, ">=" + Program.windowSize.X.ToString(), _window, true);

            GuiGroup resolutionXGroup = new GuiGroup(new Vector2D(0, 0));

            resolutionXGroup.AddDrawable(resolutionX);
            resolutionXGroup.AddDrawable(resolutionXInput);
            _textfields.Add(resolutionXInput);

            Text resolutionY = new Text("RESOLUTION Y", _font, 20);

            MainMenu.SetTextOriginToMiddle(resolutionY);
            resolutionY.Position = new Vector2D(-60, -3);

            Vector2D  resolutionYInputPosition = new Vector2D(100, 0);
            Textfield resolutionYInput         = new Textfield(resolutionYInputPosition, _textfieldSize, _font, 20, false, ">=" + Program.windowSize.Y.ToString(), _window, true);

            GuiGroup resolutionYGroup = new GuiGroup(new Vector2D(0, _settingsDistances));

            resolutionYGroup.AddDrawable(resolutionY);
            resolutionYGroup.AddDrawable(resolutionYInput);
            _textfields.Add(resolutionYInput);

            resolutionXInput.IsVisible = !Program.fullscreen;
            resolutionYInput.IsVisible = !Program.fullscreen;

            this.AddDrawable(resolutionXGroup);
            this.AddDrawable(resolutionYGroup);
        }