Example #1
0
        public void SetPositionTest()
        {
            Vector2    position  = new Vector2();                // TODO: Initialize to an appropriate value
            SpriteFont font      = null;                         // TODO: Initialize to an appropriate value
            CheckBox   target    = new CheckBox(position, font); // TODO: Initialize to an appropriate value
            Vector2    position1 = new Vector2();                // TODO: Initialize to an appropriate value

            target.SetPosition(position1);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Check"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public Check(Controls.Control parent)
            : base(parent)
        {
            m_CheckBox = new CheckBox(this);
            m_CheckBox.ShouldDrawBackground = false;
            m_CheckBox.CheckChanged += OnValueChanged;
            m_CheckBox.IsTabable = true;
            m_CheckBox.KeyboardInputEnabled = true;
            m_CheckBox.SetPosition(2, 1);

            Height = 18;
        }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Check"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public Check(Controls.Control parent)
            : base(parent)
        {
            m_CheckBox = new CheckBox(this);
            m_CheckBox.ShouldDrawBackground = false;
            m_CheckBox.CheckChanged        += OnValueChanged;
            m_CheckBox.IsTabable            = true;
            m_CheckBox.KeyboardInputEnabled = true;
            m_CheckBox.SetPosition(2, 1);

            Height = 18;
        }
Example #4
0
        public void SetWidgetLayout(LayoutOrientation orientation)
        {
            switch (orientation)
            {
            case LayoutOrientation.Vertical:
                this.DesignWidth  = 544;
                this.DesignHeight = 960;

                Button_1.SetPosition(52, 245);
                Button_1.SetSize(214, 56);
                Button_1.Anchors = Anchors.None;
                Button_1.Visible = true;

                CheckBox_1.SetPosition(51, 14);
                CheckBox_1.SetSize(56, 56);
                CheckBox_1.Anchors = Anchors.Height | Anchors.Width;
                CheckBox_1.Visible = true;

                break;

            default:
                this.DesignWidth  = 960;
                this.DesignHeight = 544;

                Button_1.SetPosition(51, 285);
                Button_1.SetSize(214, 56);
                Button_1.Anchors = Anchors.None;
                Button_1.Visible = true;

                CheckBox_1.SetPosition(90, 83);
                CheckBox_1.SetSize(56, 56);
                CheckBox_1.Anchors = Anchors.Height | Anchors.Width;
                CheckBox_1.Visible = true;

                break;
            }
            _currentLayoutOrientation = orientation;
        }
Example #5
0
        private void CreateBoolFieldControl(Base parent, int x, ref int y, string name, string labelText, bool initialValue)
        {
            Label label = new Label(parent);

            label.Name = $"{name}Label";
            label.Text = labelText;
            label.SetPosition(x, y + 3);
            label.Alignment = Pos.CenterV | Pos.Left;

            CheckBox checkBox = new CheckBox(parent);

            checkBox.Name      = $"{name}CheckBox";
            checkBox.IsChecked = initialValue;
            checkBox.SetPosition(x + 110, y);
            checkBox.CheckChanged += OnCheckboxValueChanged;

            y += 25;
        }
        //Init
        public AdminWindow(Canvas gameCanvas)
        {
            mAdminWindow = new WindowControl(gameCanvas, Strings.Admin.title);
            mAdminWindow.SetSize(200, 540);
            mAdminWindow.SetPosition(
                Graphics.Renderer.GetScreenWidth() / 2 - mAdminWindow.Width / 2,
                Graphics.Renderer.GetScreenHeight() / 2 - mAdminWindow.Height / 2
                );

            mAdminWindow.DisableResizing();
            mAdminWindow.Margin  = Margin.Zero;
            mAdminWindow.Padding = Padding.Zero;

            //Player Mods
            mNameLabel = new Label(mAdminWindow);
            mNameLabel.SetPosition(6, 4);
            mNameLabel.Text = Strings.Admin.name;

            mNameTextbox = new TextBox(mAdminWindow);
            mNameTextbox.SetBounds(6, 22, 188, 18);
            Interface.FocusElements.Add(mNameTextbox);

            mWarpToMeButton = new Button(mAdminWindow)
            {
                Text = Strings.Admin.warp2me
            };

            mWarpToMeButton.SetBounds(6, 44, 80, 18);
            mWarpToMeButton.Clicked += _warpToMeButton_Clicked;

            mWarpMeToButton = new Button(mAdminWindow)
            {
                Text = Strings.Admin.warpme2
            };

            mWarpMeToButton.SetBounds(6, 64, 80, 18);
            mWarpMeToButton.Clicked += _warpMeToButton_Clicked;

            mKickButton = new Button(mAdminWindow)
            {
                Text = Strings.Admin.kick
            };

            mKickButton.SetBounds(90, 44, 50, 18);
            mKickButton.Clicked += _kickButton_Clicked;

            mKillButton = new Button(mAdminWindow)
            {
                Text = Strings.Admin.kill
            };

            mKillButton.SetBounds(144, 44, 50, 18);
            mKillButton.Clicked += _killButton_Clicked;

            mBanButton = new Button(mAdminWindow)
            {
                Text = Strings.Admin.ban
            };

            mBanButton.SetBounds(90, 64, 50, 18);
            mBanButton.Clicked += _banButton_Clicked;

            mUnbanButton = new Button(mAdminWindow)
            {
                Text = Strings.Admin.unban
            };

            mUnbanButton.SetBounds(90, 84, 50, 18);
            mUnbanButton.Clicked += _unbanButton_Clicked;

            mMuteButton = new Button(mAdminWindow)
            {
                Text = Strings.Admin.mute
            };

            mMuteButton.SetBounds(144, 64, 50, 18);
            mMuteButton.Clicked += _muteButton_Clicked;

            mUnmuteButton = new Button(mAdminWindow)
            {
                Text = Strings.Admin.unmute
            };

            mUnmuteButton.SetBounds(144, 84, 50, 18);
            mUnmuteButton.Clicked += _unmuteButton_Clicked;

            mSpriteLabel = new Label(mAdminWindow);
            mSpriteLabel.SetPosition(6, 112);
            mSpriteLabel.Text = Strings.Admin.sprite;

            mSpriteDropdown = new ComboBox(mAdminWindow);
            mSpriteDropdown.SetBounds(6, 128, 80, 18);
            mSpriteDropdown.AddItem(Strings.Admin.none);
            var sprites = Globals.ContentManager.GetTextureNames(GameContentManager.TextureType.Entity);

            Array.Sort(sprites, new AlphanumComparatorFast());
            foreach (var sprite in sprites)
            {
                mSpriteDropdown.AddItem(sprite);
            }

            mSpriteDropdown.ItemSelected += _spriteDropdown_ItemSelected;

            mSetSpriteButton = new Button(mAdminWindow)
            {
                Text = Strings.Admin.setsprite
            };

            mSetSpriteButton.SetBounds(6, 148, 80, 18);
            mSetSpriteButton.Clicked += _setSpriteButton_Clicked;

            SpriteContainer = new ImagePanel(mAdminWindow);
            SpriteContainer.SetSize(50, 50);
            SpriteContainer.SetPosition(115, 114);
            SpritePanel = new ImagePanel(SpriteContainer);

            mFaceLabel = new Label(mAdminWindow);
            mFaceLabel.SetPosition(6, 172);
            mFaceLabel.Text = Strings.Admin.face;

            mFaceDropdown = new ComboBox(mAdminWindow);
            mFaceDropdown.SetBounds(6, 188, 80, 18);
            mFaceDropdown.AddItem(Strings.Admin.none);
            var faces = Globals.ContentManager.GetTextureNames(GameContentManager.TextureType.Face);

            Array.Sort(faces, new AlphanumComparatorFast());
            foreach (var face in faces)
            {
                mFaceDropdown.AddItem(face);
            }

            mFaceDropdown.ItemSelected += _faceDropdown_ItemSelected;

            mSetFaceButton = new Button(mAdminWindow)
            {
                Text = Strings.Admin.setface
            };

            mSetFaceButton.SetBounds(6, 208, 80, 18);
            mSetFaceButton.Clicked += _setFaceButton_Clicked;

            FacePanel = new ImagePanel(mAdminWindow);
            FacePanel.SetSize(50, 50);
            FacePanel.SetPosition(115, 174);

            mAccessLabel = new Label(mAdminWindow);
            mAccessLabel.SetPosition(6, 232);
            mAccessLabel.Text = Strings.Admin.access;

            mAccessDropdown = new ComboBox(mAdminWindow);
            mAccessDropdown.SetBounds(6, 248, 80, 18);
            mAccessDropdown.AddItem(Strings.Admin.access0).UserData = "None";
            mAccessDropdown.AddItem(Strings.Admin.access1).UserData = "Moderator";
            mAccessDropdown.AddItem(Strings.Admin.access2).UserData = "Admin";

            mSetPowerButton = new Button(mAdminWindow)
            {
                Text = Strings.Admin.setpower
            };

            mSetPowerButton.SetBounds(6, 268, 80, 18);
            mSetPowerButton.Clicked += _setPowerButton_Clicked;

            CreateMapList();
            mMapListLabel = new Label(mAdminWindow)
            {
                Text = Strings.Admin.maplist
            };

            mMapListLabel.SetPosition(4f, 294);

            mChkChronological = new CheckBox(mAdminWindow);
            mChkChronological.SetToolTipText(Strings.Admin.chronologicaltip);
            mChkChronological.SetPosition(mAdminWindow.Width - 24, 294);
            mChkChronological.CheckChanged += _chkChronological_CheckChanged;

            mLblChronological = new Label(mAdminWindow)
            {
                Text = Strings.Admin.chronological
            };

            mLblChronological.SetPosition(mChkChronological.X - 30, 294);

            UpdateMapList();
        }
Example #7
0
        public BanMuteBox(string title, string prompt, bool modal, EventHandler okayClicked)
        {
            OkayEventHandler = okayClicked;

            mMyWindow = new WindowControl(Interface.GameUi.GameCanvas, title, modal);
            mMyWindow.SetSize(500, 150);
            mMyWindow.SetPosition(
                Graphics.Renderer.GetScreenWidth() / 2 - mMyWindow.Width / 2,
                Graphics.Renderer.GetScreenHeight() / 2 - mMyWindow.Height / 2
                );

            mMyWindow.IsClosable = false;
            mMyWindow.DisableResizing();
            mMyWindow.Margin  = Margin.Zero;
            mMyWindow.Padding = Padding.Zero;
            Interface.InputBlockingElements.Add(mMyWindow);

            var promptLabel = new Label(mMyWindow);

            promptLabel.SetText(prompt);
            promptLabel.SetPosition(mMyWindow.Width / 2 - promptLabel.Width / 2, 8);

            var y = promptLabel.Y + promptLabel.Height + 8;

            mReasonLabel = new Label(mMyWindow)
            {
                Text = Strings.BanMute.reason
            };

            mReasonLabel.SetPosition(100, y);

            mReasonBox = new TextBox(mMyWindow);
            mReasonBox.SetBounds(180, y - 3, 220, 22);
            Interface.FocusElements.Add(mReasonBox);

            y = mReasonBox.Bottom + 6;

            mDurationLabel = new Label(mMyWindow)
            {
                Text = Strings.BanMute.duration
            };

            mDurationLabel.SetPosition(100, y);

            mDurationBox = new ComboBox(mMyWindow);
            mDurationBox.SetBounds(180, y - 3, 80, 22);
            mDurationBox.AddItem(Strings.BanMute.oneday).UserData    = "1 day";
            mDurationBox.AddItem(Strings.BanMute.twodays).UserData   = "2 days";
            mDurationBox.AddItem(Strings.BanMute.threedays).UserData = "3 days";
            mDurationBox.AddItem(Strings.BanMute.fourdays).UserData  = "4 days";
            mDurationBox.AddItem(Strings.BanMute.fivedays).UserData  = "5 days";
            mDurationBox.AddItem(Strings.BanMute.oneweek).UserData   = "1 week";
            mDurationBox.AddItem(Strings.BanMute.twoweeks).UserData  = "2 weeks";
            mDurationBox.AddItem(Strings.BanMute.onemonth).UserData  = "1 month";
            mDurationBox.AddItem(Strings.BanMute.twomonths).UserData = "2 months";
            mDurationBox.AddItem(Strings.BanMute.sixmonths).UserData = "6 months";
            mDurationBox.AddItem(Strings.BanMute.oneyear).UserData   = "1 year";
            mDurationBox.AddItem(Strings.BanMute.forever).UserData   = "Indefinitely";

            mIpLabel = new Label(mMyWindow)
            {
                Text = Strings.BanMute.ip
            };

            mIpLabel.SetPosition(320, y);

            mIpCheckbox = new CheckBox(mMyWindow);
            mIpCheckbox.SetPosition(400 - mIpCheckbox.Width, y);

            var okayBtn = new Button(mMyWindow);

            okayBtn.SetSize(86, 22);
            okayBtn.SetText(Strings.BanMute.ok);
            okayBtn.SetPosition(mMyWindow.Width / 2 - 188 / 2, 90);
            okayBtn.Clicked += okayBtn_Clicked;

            var cancelBtn = new Button(mMyWindow);

            cancelBtn.SetSize(86, 22);
            cancelBtn.SetText(Strings.BanMute.cancel);
            cancelBtn.Clicked += CancelBtn_Clicked;
            cancelBtn.SetPosition(mMyWindow.Width / 2 - 188 / 2 + 86 + 16, 90);
        }
Example #8
0
        public static void Main(params string[] Args)
        {
            Graphics.Start();
            Audio.Start();
            //BorderlessWindow Window = new BorderlessWindow();
            //Window.Show();

            UIWindow Window = new UIWindow();

            Window.SetBackgroundColor(SystemColors.WindowBackground);

            GroupBox GroupBox1 = new GroupBox(Window.UI.Container);

            GroupBox1.SetPosition(64, 64);
            GroupBox1.SetSize(400, 400);

            Label Label1 = new Label(GroupBox1);

            Label1.SetPosition(16, 21);
            Label1.SetText("Hello world! This is a standard Windows UI label.");

            Button Button1 = new Button(GroupBox1);

            Button1.SetPosition(16, 36);
            Button1.SetText("Start task");
            Button1.OnPressed += delegate(BaseEventArgs e)
            {
                Console.WriteLine($"Clicked button 1!");
                Audio.BGMPlay("D:/Dropbox/Pokemon Jam/Audio/BGM/Battle trainer.ogg", 50, 4);
            };

            Button Button2 = new Button(GroupBox1);

            Button2.SetPosition(16, Button1.Position.Y + Button1.Size.Height + 4);
            Button2.SetText("End task");
            Button2.OnPressed += delegate(BaseEventArgs e) { Console.WriteLine("Clicked button 2!"); };

            CheckBox CheckBox1 = new CheckBox(GroupBox1);

            CheckBox1.SetPosition(16, Button2.Position.Y + Button2.Size.Height + 4);
            CheckBox1.OnCheckChanged += delegate(BaseEventArgs e) { Console.WriteLine("Clicked checkbox 1!"); };

            TabView TabView1 = new TabView(GroupBox1);

            TabView1.SetPosition(130, 46);
            TabView1.SetSize(200, 200);
            TabView1.CreateTab("Autotiles");
            TabView1.CreateTab("Tilesets");
            TabView1.OnTabChanged += delegate(BaseEventArgs e) { Console.WriteLine("Changed tab!"); };

            ListBox ListBox1 = new ListBox(GroupBox1);

            ListBox1.SetPosition(15, CheckBox1.Position.Y + CheckBox1.Size.Height + 10);
            ListBox1.SetSize(100, 200);
            ListBox1.SetItems(new List <ListItem>()
            {
                new ListItem("Alpha"),
                new ListItem("Beta"),
                new ListItem("Gamma"),
                new ListItem("Delta"),
                new ListItem("Epsilon"),
                new ListItem("Zeta"),
                new ListItem("Etha"),
                new ListItem("Iota"),
                new ListItem("Kappa"),
                new ListItem("Labda"),
                new ListItem("Mu"),
                new ListItem("Nu"),
                new ListItem("Xi"),
                new ListItem("Omicron"),
                new ListItem("Pi"),
                new ListItem("Rho"),
                new ListItem("Sigma"),
                new ListItem("Tau"),
                new ListItem("Upsilon"),
                new ListItem("Phi"),
                new ListItem("Chi"),
                new ListItem("Psi"),
                new ListItem("Omega")
            });
            ListBox1.OnSelectionChanged += delegate(BaseEventArgs e)
            {
                Console.WriteLine($"Selection: {ListBox1.SelectedIndex}");
            };

            RadioBox RadioBox1 = new RadioBox(GroupBox1);

            RadioBox1.SetPosition(ListBox1.Position.X, ListBox1.Position.Y + ListBox1.Size.Height + 10);
            RadioBox1.SetText("Is shiny?");
            RadioBox1.OnCheckChanged += delegate(BaseEventArgs e)
            {
                if (RadioBox1.Checked)
                {
                    System.Console.WriteLine("Checked RadioBox 1");
                }
            };
            RadioBox RadioBox2 = new RadioBox(GroupBox1);

            RadioBox2.SetPosition(RadioBox1.Position.X, RadioBox1.Position.Y + RadioBox1.Size.Height + 4);
            RadioBox2.SetText("Is modifiable?");
            RadioBox2.OnCheckChanged += delegate(BaseEventArgs e)
            {
                if (RadioBox2.Checked)
                {
                    System.Console.WriteLine("Checked RadioBox 2");
                }
            };

            Window.Show();

            while (Graphics.CanUpdate())
            {
                Graphics.Update();
            }
            Graphics.Stop();
        }
        public OptionScene()
        {
            Console.WriteLine("---- option scene ----");
            this.Camera.SetViewFromViewport();

            Sce.PlayStation.HighLevel.UI.Panel panel = new Panel();//create panel
            panel.Width = Director.Instance.GL.Context.GetViewport().Width;
            panel.Height = Director.Instance.GL.Context.GetViewport().Height;

            Sce.PlayStation.HighLevel.UI.Label title_label = new Sce.PlayStation.HighLevel.UI.Label();//title label
            Sce.PlayStation.HighLevel.UI.Label music_label = new Sce.PlayStation.HighLevel.UI.Label();//music label
            Sce.PlayStation.HighLevel.UI.Label sound_label = new Sce.PlayStation.HighLevel.UI.Label();//sound label

            labelSetting(title_label,                   //label name
                         "Option",   					//label content
                         panel.Width/10,				//x position
                         10,							//y position
                         250,							//x size
                         100,							//y size
                         64,							//font size
                         FontStyle.Bold,				//font style
                         new UIColor(0, 255, 0, 255));	//font color

            labelSetting(music_label,
                         "Music :",
                         panel.Width/7,
                         panel.Height/5,
                         150,
                         100,
                         32,
                         FontStyle.Regular,
                         new UIColor(0, 255, 0, 255));

            labelSetting(sound_label,
                         "Sound :",
                         panel.Width/7,
                         panel.Height/3f,
                         150,
                         100,
                         32,
                         FontStyle.Regular,
                         new UIColor(0, 255, 0, 255));

            Sce.PlayStation.HighLevel.UI.CheckBox checkMusicButton = new CheckBox(); //music
            checkMusicButton.Checked = isMusicCheckboxChanged;
            checkMusicButton.SetPosition(panel.Width/3,panel.Height/4.5f);
            checkMusicButton.SetSize(50,50);
            checkMusicButton.CheckedChanged += HandleCheckMusicButtonCheckedChanged;

            sliderForMusic = new Sce.PlayStation.HighLevel.UI.Slider();
            sliderForMusic.SetPosition(panel.Width/2f,panel.Height/4.5f);
            sliderForMusic.SetSize(200,50);
            sliderForMusic.MinValue = 0;
            sliderForMusic.MaxValue = 1;
            sliderForMusic.Value = 0.5f;
            sliderForMusic.ValueChanging += HandleSliderForMusicValueChanging;//end music

            Sce.PlayStation.HighLevel.UI.CheckBox checkSoundButton = new CheckBox();//sound
            checkSoundButton.Checked = isSoundCheckboxChanged;
            checkSoundButton.SetPosition(panel.Width/3,panel.Height/2.5f);
            checkSoundButton.SetSize(50,50);
            checkSoundButton.CheckedChanged += HandleCheckSoundButtonCheckedChanged;

            sliderForSound = new Sce.PlayStation.HighLevel.UI.Slider();
            sliderForSound.SetPosition(panel.Width/2f,panel.Height/2.5f);
            sliderForSound.SetSize(200,50);
            sliderForSound.MinValue = 0;
            sliderForSound.MaxValue = 1;
            sliderForSound.Value = Support.SoundSystem.volumOfSound;
            sliderForSound.ValueChanging += HandleSliderForSoundValueChanging;//end sound

            Button buttonUI1 = new Button(); //buttons
            buttonUI1.Name = "go back";
            buttonUI1.Text = "go back";
            buttonUI1.Width = 250;
            buttonUI1.Height = 50;
            buttonUI1.Alpha = 0.8f;
            buttonUI1.SetPosition(panel.Width/5,panel.Height - 100);
            buttonUI1.TouchEventReceived += (sender, e) => {
                Support.SoundSystem.Instance.PlayNoClobber("ButtonClick.wav");
                Director.Instance.ReplaceScene(new MenuScene());
            };

            Button buttonUI2 = new Button();
            buttonUI2.Name = "reset";
            buttonUI2.Text = "reset";
            buttonUI2.Width = 250;
            buttonUI2.Height = 50;
            buttonUI2.Alpha = 0.8f;
            buttonUI2.SetPosition(panel.Width/2f,panel.Height - 100);
            buttonUI2.TouchEventReceived += (sender, e) => {
                Support.SoundSystem.Instance.PlayNoClobber("ButtonClick.wav");
            };

            _uiScene = new Sce.PlayStation.HighLevel.UI.Scene();
            panel.AddChildLast(title_label);//add widgets in panel
            panel.AddChildLast(music_label);
            panel.AddChildLast(sound_label);
            panel.AddChildLast(checkMusicButton);
            panel.AddChildLast(checkSoundButton);
            panel.AddChildLast(sliderForMusic);
            panel.AddChildLast(sliderForSound);
            panel.AddChildLast(buttonUI1);
            panel.AddChildLast(buttonUI2);

            _uiScene.RootWidget.AddChildLast(panel);//add panel in rootwidget
            UISystem.SetScene(_uiScene); //add rootwidget in scene
            Scheduler.Instance.ScheduleUpdateForTarget(this,0,false); //run the loop
        }
Example #10
0
        private void CreateOffsetsTabPageControls(TabButton tab, string name)
        {
            Base page = tab.Page;

            page.Name = $"{name}Page";

            Label label = new Label(page);

            label.Name = $"{name}Label";
            label.Text = "Model ";
            label.SetPosition(12, 5 + 3);
            label.Alignment = Pos.CenterV | Pos.Left;

            ComboBox comboBox = new ComboBox(page);

            comboBox.Name = $"{name}ComboBox";
            comboBox.SetPosition(60, 5);
            comboBox.Width += 20;
            comboBox.AddItem("New...", $"{name}ComboBoxItemNew");
            int j = 1;

            foreach (KeyValuePair <string, VehicleData> entry in Plugin.Settings.Vehicles.Data)
            {
                comboBox.AddItem(entry.Key, $"{name}ComboBoxItem{j++}", new Model(entry.Key));
            }
            comboBox.SelectByText(Plugin.Settings.Vehicles.Data.First().Key);
            comboBox.ItemSelected += OnOffsetsComboBoxItemSelected;

            Vector3 v = Plugin.Settings.Vehicles.Data.First().Value.Offset;

            string[] vecComponents = "X,Y,Z".Split(',');
            for (int i = 0; i < vecComponents.Length; i++)
            {
                string vecComp = vecComponents[i];

                int x = 250;
                int y = 5 + 30 * i;

                Label vecCompLabel = new Label(page);
                vecCompLabel.Name = $"{name}{vecComp}Label";
                vecCompLabel.Text = vecComp;
                vecCompLabel.SetPosition(x, y + 3);
                vecCompLabel.Alignment = Pos.CenterV | Pos.Left;

                NumericUpDownEx upDown = new NumericUpDownEx(page);
                upDown.Name      = $"{name}{vecComp}NumUpDown";
                upDown.Min       = -999;
                upDown.Max       = 999;
                upDown.Increment = 0.01f;
                upDown.Value     = v[i];
                upDown.SetPosition(x + 15, y);
                upDown.ValueChanged += OnOffsetsValueChanged;
            }

            Label disableTurretLabel = new Label(page);

            disableTurretLabel.Name = $"{name}DisableTurretLabel";
            disableTurretLabel.Text = "Disable Turret";
            disableTurretLabel.SetPosition(430, 5);
            disableTurretLabel.Alignment = Pos.CenterV | Pos.Left;

            CheckBox disableTurretCheckBox = new CheckBox(page);

            disableTurretCheckBox.Name = $"{name}DisableTurretCheckBox";
            disableTurretCheckBox.SetPosition(500, 5);
            disableTurretCheckBox.CheckChanged += OnOffsetsValueChanged;

            Button saveButton = new Button(page);

            saveButton.Name  = $"{name}SaveButton";
            saveButton.Text  = "Save ";
            saveButton.Width = 150;
            saveButton.SetPosition(12, 65);
            saveButton.Clicked += OnOffsetsSaveButtonClicked;
            saveButton.SetToolTipText("Saves all offsets to the vehicle settings file");


            if (Game.LocalPlayer.Character.IsInAnyVehicle(false))
            {
                Model m = Game.LocalPlayer.Character.CurrentVehicle.Model;

                comboBox.SelectByUserData(m);
            }
        }