N64 controller config - fix enabling/disabling of Pak dropdown when the connected checkbox is checked
This commit is contained in:
parent
5f71bf11c8
commit
555a30c492
|
@ -28,56 +28,57 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.EnabledCheckbox = new System.Windows.Forms.CheckBox();
|
||||
this.PakTypeDropdown = new System.Windows.Forms.ComboBox();
|
||||
this.ControllerNameLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// EnabledCheckbox
|
||||
//
|
||||
this.EnabledCheckbox.AutoSize = true;
|
||||
this.EnabledCheckbox.Location = new System.Drawing.Point(80, 2);
|
||||
this.EnabledCheckbox.Name = "EnabledCheckbox";
|
||||
this.EnabledCheckbox.Size = new System.Drawing.Size(78, 17);
|
||||
this.EnabledCheckbox.TabIndex = 0;
|
||||
this.EnabledCheckbox.Text = "Connected";
|
||||
this.EnabledCheckbox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// PakTypeDropdown
|
||||
//
|
||||
this.PakTypeDropdown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.PakTypeDropdown.FormattingEnabled = true;
|
||||
this.PakTypeDropdown.Items.AddRange(new object[] {
|
||||
this.EnabledCheckbox = new System.Windows.Forms.CheckBox();
|
||||
this.PakTypeDropdown = new System.Windows.Forms.ComboBox();
|
||||
this.ControllerNameLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// EnabledCheckbox
|
||||
//
|
||||
this.EnabledCheckbox.AutoSize = true;
|
||||
this.EnabledCheckbox.Location = new System.Drawing.Point(80, 2);
|
||||
this.EnabledCheckbox.Name = "EnabledCheckbox";
|
||||
this.EnabledCheckbox.Size = new System.Drawing.Size(78, 17);
|
||||
this.EnabledCheckbox.TabIndex = 0;
|
||||
this.EnabledCheckbox.Text = "Connected";
|
||||
this.EnabledCheckbox.UseVisualStyleBackColor = true;
|
||||
this.EnabledCheckbox.CheckedChanged += new System.EventHandler(this.EnabledCheckbox_CheckedChanged);
|
||||
//
|
||||
// PakTypeDropdown
|
||||
//
|
||||
this.PakTypeDropdown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.PakTypeDropdown.FormattingEnabled = true;
|
||||
this.PakTypeDropdown.Items.AddRange(new object[] {
|
||||
"None",
|
||||
"Memory Card",
|
||||
"Rumble Pak",
|
||||
"Transfer Pak"});
|
||||
this.PakTypeDropdown.Location = new System.Drawing.Point(160, 0);
|
||||
this.PakTypeDropdown.Name = "PakTypeDropdown";
|
||||
this.PakTypeDropdown.Size = new System.Drawing.Size(121, 21);
|
||||
this.PakTypeDropdown.TabIndex = 1;
|
||||
//
|
||||
// ControllerNameLabel
|
||||
//
|
||||
this.ControllerNameLabel.AutoSize = true;
|
||||
this.ControllerNameLabel.Location = new System.Drawing.Point(3, 4);
|
||||
this.ControllerNameLabel.Name = "ControllerNameLabel";
|
||||
this.ControllerNameLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.ControllerNameLabel.TabIndex = 2;
|
||||
this.ControllerNameLabel.Text = "Controller 1";
|
||||
//
|
||||
// N64ControllerSettingControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.ControllerNameLabel);
|
||||
this.Controls.Add(this.PakTypeDropdown);
|
||||
this.Controls.Add(this.EnabledCheckbox);
|
||||
this.Name = "N64ControllerSettingControl";
|
||||
this.Size = new System.Drawing.Size(290, 22);
|
||||
this.Load += new System.EventHandler(this.N64ControllerSettingControl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.PakTypeDropdown.Location = new System.Drawing.Point(160, 0);
|
||||
this.PakTypeDropdown.Name = "PakTypeDropdown";
|
||||
this.PakTypeDropdown.Size = new System.Drawing.Size(121, 21);
|
||||
this.PakTypeDropdown.TabIndex = 1;
|
||||
//
|
||||
// ControllerNameLabel
|
||||
//
|
||||
this.ControllerNameLabel.AutoSize = true;
|
||||
this.ControllerNameLabel.Location = new System.Drawing.Point(3, 4);
|
||||
this.ControllerNameLabel.Name = "ControllerNameLabel";
|
||||
this.ControllerNameLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.ControllerNameLabel.TabIndex = 2;
|
||||
this.ControllerNameLabel.Text = "Controller 1";
|
||||
//
|
||||
// N64ControllerSettingControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.ControllerNameLabel);
|
||||
this.Controls.Add(this.PakTypeDropdown);
|
||||
this.Controls.Add(this.EnabledCheckbox);
|
||||
this.Name = "N64ControllerSettingControl";
|
||||
this.Size = new System.Drawing.Size(290, 22);
|
||||
this.Load += new System.EventHandler(this.N64ControllerSettingControl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -91,5 +91,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
ControllerNameLabel.Text = "Controller " + ControllerNumber;
|
||||
base.Refresh();
|
||||
}
|
||||
|
||||
private void EnabledCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
PakTypeDropdown.Enabled = EnabledCheckbox.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue