Exemplo n.º 1
0
        private void PSXControllerConfig_Load(object sender, EventArgs e)
        {
            var psxSettings = ((Octoshock)Global.Emulator).GetSyncSettings();
            for (int i = 0; i < psxSettings.Controllers.Length; i++)
            {
                Controls.Add(new Label
                {
                    Text = "Controller " + (i + 1),
                    Location = new Point(15, 19 + (i * 25)),
                    Width = 85
                });
                Controls.Add(new CheckBox
                {
                    Text = "Connected",
                    Name = "Controller" + i,
                    Location = new Point(105, 15 + (i * 25)),
                    Checked = psxSettings.Controllers[i].IsConnected,
                    Width = 90
                });

                var dropdown = new ComboBox
                {
                    Name = "Controller" + i,
                    DropDownStyle = ComboBoxStyle.DropDownList,
                    Location = new Point(200, 15 + (i * 25))
                };

                dropdown.PopulateFromEnum<Octoshock.ControllerSetting.ControllerType>(psxSettings.Controllers[i].Type);

                Controls.Add(dropdown);
            }
        }