add Flip Axis button to AnalogBindControl. resolves issue 139

This commit is contained in:
goyuken 2014-01-11 15:11:49 +00:00
parent 864d3ede2f
commit 7fa5de3c15
2 changed files with 18 additions and 0 deletions

View File

@ -37,6 +37,7 @@
this.buttonBind = new System.Windows.Forms.Button();
this.trackBarDeadzone = new System.Windows.Forms.TrackBar();
this.labelDeadzone = new System.Windows.Forms.Label();
this.buttonFlip = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.trackBarSensitivity)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.trackBarDeadzone)).BeginInit();
this.SuspendLayout();
@ -112,10 +113,21 @@
this.labelDeadzone.TabIndex = 6;
this.labelDeadzone.Text = "Deadzone: 5 billion";
//
// buttonFlip
//
this.buttonFlip.Location = new System.Drawing.Point(88, 29);
this.buttonFlip.Name = "buttonFlip";
this.buttonFlip.Size = new System.Drawing.Size(75, 23);
this.buttonFlip.TabIndex = 7;
this.buttonFlip.Text = "Flip Axis";
this.buttonFlip.UseVisualStyleBackColor = true;
this.buttonFlip.Click += new System.EventHandler(this.buttonFlip_Click);
//
// AnalogBindControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.buttonFlip);
this.Controls.Add(this.labelDeadzone);
this.Controls.Add(this.trackBarDeadzone);
this.Controls.Add(this.buttonBind);
@ -142,5 +154,6 @@
private System.Windows.Forms.Button buttonBind;
private System.Windows.Forms.TrackBar trackBarDeadzone;
private System.Windows.Forms.Label labelDeadzone;
private System.Windows.Forms.Button buttonFlip;
}
}

View File

@ -78,5 +78,10 @@ namespace BizHawk.Client.EmuHawk
Bind.Deadzone = trackBarDeadzone.Value / 20.0f;
labelDeadzone.Text = String.Format("Deadzone: {0}", (Bind.Deadzone*100)) + "%";
}
private void buttonFlip_Click(object sender, EventArgs e)
{
trackBarSensitivity.Value *= -1;
}
}
}