Added Min/Max ranges for N64.

Added the option to add more controllers.
This commit is contained in:
xmikecampx7 2014-04-27 17:38:30 +00:00
parent c4a4ca069d
commit b5c0be3f7f
5 changed files with 608 additions and 476 deletions

View File

@ -52,8 +52,8 @@ namespace BizHawk.Client.EmuHawk
private int GFXToReal(int val)
{
int ret = (val * 2);
if (ret > 127) ret = 127;
if (ret < -128) ret = -128;
if (ret > Max) ret = Max;
if (ret < Min) ret = Min;
return ret;
}
@ -145,7 +145,7 @@ namespace BizHawk.Client.EmuHawk
Refresh();
}
public static int Max = 127;
public static int Min = -127;
public static int Max;
public static int Min;
}
}

View File

@ -28,68 +28,70 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VirtualPadForm));
this.ControllerBox = new System.Windows.Forms.GroupBox();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ClearMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1 = new MenuStripEx();
this.OptionsSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.AutoloadMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SaveWindowPositionMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AlwaysOnTopMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.FloatingWindowMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.RestoreDefaultSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.StickyBox = new System.Windows.Forms.CheckBox();
this.ClearButton = new System.Windows.Forms.Button();
this.contextMenuStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// ControllerBox
//
this.ControllerBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VirtualPadForm));
this.ControllerBox = new System.Windows.Forms.GroupBox();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ClearMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1 = new MenuStripEx();
this.OptionsSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.AutoloadMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SaveWindowPositionMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AlwaysOnTopMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.FloatingWindowMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.RestoreDefaultSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.StickyBox = new System.Windows.Forms.CheckBox();
this.ClearButton = new System.Windows.Forms.Button();
this.addPlayerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// ControllerBox
//
this.ControllerBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ControllerBox.ContextMenuStrip = this.contextMenuStrip1;
this.ControllerBox.Location = new System.Drawing.Point(9, 26);
this.ControllerBox.Name = "ControllerBox";
this.ControllerBox.Size = new System.Drawing.Size(431, 251);
this.ControllerBox.TabIndex = 5;
this.ControllerBox.TabStop = false;
this.ControllerBox.Text = "Controllers";
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ControllerBox.ContextMenuStrip = this.contextMenuStrip1;
this.ControllerBox.Location = new System.Drawing.Point(9, 26);
this.ControllerBox.Name = "ControllerBox";
this.ControllerBox.Size = new System.Drawing.Size(431, 251);
this.ControllerBox.TabIndex = 5;
this.ControllerBox.TabStop = false;
this.ControllerBox.Text = "Controllers";
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ClearMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(102, 26);
//
// ClearMenuItem
//
this.ClearMenuItem.Name = "ClearMenuItem";
this.ClearMenuItem.Size = new System.Drawing.Size(101, 22);
this.ClearMenuItem.Text = "&Clear";
this.ClearMenuItem.Click += new System.EventHandler(this.ClearMenuItem_Click);
//
// menuStrip1
//
this.menuStrip1.ClickThrough = true;
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.OptionsSubMenu});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(452, 24);
this.menuStrip1.TabIndex = 6;
this.menuStrip1.Text = "menuStrip1";
//
// OptionsSubMenu
//
this.OptionsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(100, 26);
//
// ClearMenuItem
//
this.ClearMenuItem.Name = "ClearMenuItem";
this.ClearMenuItem.Size = new System.Drawing.Size(99, 22);
this.ClearMenuItem.Text = "&Clear";
this.ClearMenuItem.Click += new System.EventHandler(this.ClearMenuItem_Click);
//
// menuStrip1
//
this.menuStrip1.ClickThrough = true;
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.OptionsSubMenu,
this.addPlayerToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(452, 24);
this.menuStrip1.TabIndex = 6;
this.menuStrip1.Text = "menuStrip1";
//
// OptionsSubMenu
//
this.OptionsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.AutoloadMenuItem,
this.SaveWindowPositionMenuItem,
this.AlwaysOnTopMenuItem,
@ -98,110 +100,117 @@
this.RestoreDefaultSettingsMenuItem,
this.toolStripSeparator1,
this.ExitMenuItem});
this.OptionsSubMenu.Name = "OptionsSubMenu";
this.OptionsSubMenu.Size = new System.Drawing.Size(61, 20);
this.OptionsSubMenu.Text = "&Options";
this.OptionsSubMenu.DropDownOpened += new System.EventHandler(this.OptionsSubMenu_DropDownOpened);
//
// AutoloadMenuItem
//
this.AutoloadMenuItem.Name = "AutoloadMenuItem";
this.AutoloadMenuItem.Size = new System.Drawing.Size(199, 22);
this.AutoloadMenuItem.Text = "&Autoload";
this.AutoloadMenuItem.Click += new System.EventHandler(this.AutoloadMenuItem_Click);
//
// SaveWindowPositionMenuItem
//
this.SaveWindowPositionMenuItem.Name = "SaveWindowPositionMenuItem";
this.SaveWindowPositionMenuItem.Size = new System.Drawing.Size(199, 22);
this.SaveWindowPositionMenuItem.Text = "&Save Window Position";
this.SaveWindowPositionMenuItem.Click += new System.EventHandler(this.SaveWindowPositionMenuItem_Click);
//
// AlwaysOnTopMenuItem
//
this.AlwaysOnTopMenuItem.Name = "AlwaysOnTopMenuItem";
this.AlwaysOnTopMenuItem.Size = new System.Drawing.Size(199, 22);
this.AlwaysOnTopMenuItem.Text = "Always On Top";
this.AlwaysOnTopMenuItem.Click += new System.EventHandler(this.AlwaysOnTopMenuItem_Click);
//
// FloatingWindowMenuItem
//
this.FloatingWindowMenuItem.Name = "FloatingWindowMenuItem";
this.FloatingWindowMenuItem.Size = new System.Drawing.Size(199, 22);
this.FloatingWindowMenuItem.Text = "Floating Window";
this.FloatingWindowMenuItem.Click += new System.EventHandler(this.FloatingWindowMenuItem_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(196, 6);
//
// RestoreDefaultSettingsMenuItem
//
this.RestoreDefaultSettingsMenuItem.Name = "RestoreDefaultSettingsMenuItem";
this.RestoreDefaultSettingsMenuItem.Size = new System.Drawing.Size(199, 22);
this.RestoreDefaultSettingsMenuItem.Text = "Restore Default Settings";
this.RestoreDefaultSettingsMenuItem.Click += new System.EventHandler(this.RestoreDefaultSettingsMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(196, 6);
//
// ExitMenuItem
//
this.ExitMenuItem.Name = "ExitMenuItem";
this.ExitMenuItem.ShortcutKeyDisplayString = "Alt+F4";
this.ExitMenuItem.Size = new System.Drawing.Size(199, 22);
this.ExitMenuItem.Text = "E&xit";
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
//
// StickyBox
//
this.StickyBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.StickyBox.AutoSize = true;
this.StickyBox.Location = new System.Drawing.Point(9, 283);
this.StickyBox.Name = "StickyBox";
this.StickyBox.Size = new System.Drawing.Size(55, 17);
this.StickyBox.TabIndex = 7;
this.StickyBox.TabStop = false;
this.StickyBox.Text = "Sticky";
this.StickyBox.UseVisualStyleBackColor = true;
this.StickyBox.CheckedChanged += new System.EventHandler(this.StickyBox_CheckedChanged);
//
// ClearButton
//
this.ClearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ClearButton.Location = new System.Drawing.Point(79, 279);
this.ClearButton.Name = "ClearButton";
this.ClearButton.Size = new System.Drawing.Size(75, 23);
this.ClearButton.TabIndex = 8;
this.ClearButton.TabStop = false;
this.ClearButton.Text = "&Clear";
this.ClearButton.UseVisualStyleBackColor = true;
this.ClearButton.Click += new System.EventHandler(this.ClearMenuItem_Click);
//
// VirtualPadForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(452, 312);
this.Controls.Add(this.ClearButton);
this.Controls.Add(this.ControllerBox);
this.Controls.Add(this.StickyBox);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.MinimumSize = new System.Drawing.Size(100, 100);
this.Name = "VirtualPadForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Virtual Pads";
this.Load += new System.EventHandler(this.VirtualPadForm_Load);
this.contextMenuStrip1.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
this.OptionsSubMenu.Name = "OptionsSubMenu";
this.OptionsSubMenu.Size = new System.Drawing.Size(56, 20);
this.OptionsSubMenu.Text = "&Options";
this.OptionsSubMenu.DropDownOpened += new System.EventHandler(this.OptionsSubMenu_DropDownOpened);
//
// AutoloadMenuItem
//
this.AutoloadMenuItem.Name = "AutoloadMenuItem";
this.AutoloadMenuItem.Size = new System.Drawing.Size(192, 22);
this.AutoloadMenuItem.Text = "&Autoload";
this.AutoloadMenuItem.Click += new System.EventHandler(this.AutoloadMenuItem_Click);
//
// SaveWindowPositionMenuItem
//
this.SaveWindowPositionMenuItem.Name = "SaveWindowPositionMenuItem";
this.SaveWindowPositionMenuItem.Size = new System.Drawing.Size(192, 22);
this.SaveWindowPositionMenuItem.Text = "&Save Window Position";
this.SaveWindowPositionMenuItem.Click += new System.EventHandler(this.SaveWindowPositionMenuItem_Click);
//
// AlwaysOnTopMenuItem
//
this.AlwaysOnTopMenuItem.Name = "AlwaysOnTopMenuItem";
this.AlwaysOnTopMenuItem.Size = new System.Drawing.Size(192, 22);
this.AlwaysOnTopMenuItem.Text = "Always On Top";
this.AlwaysOnTopMenuItem.Click += new System.EventHandler(this.AlwaysOnTopMenuItem_Click);
//
// FloatingWindowMenuItem
//
this.FloatingWindowMenuItem.Name = "FloatingWindowMenuItem";
this.FloatingWindowMenuItem.Size = new System.Drawing.Size(192, 22);
this.FloatingWindowMenuItem.Text = "Floating Window";
this.FloatingWindowMenuItem.Click += new System.EventHandler(this.FloatingWindowMenuItem_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(189, 6);
//
// RestoreDefaultSettingsMenuItem
//
this.RestoreDefaultSettingsMenuItem.Name = "RestoreDefaultSettingsMenuItem";
this.RestoreDefaultSettingsMenuItem.Size = new System.Drawing.Size(192, 22);
this.RestoreDefaultSettingsMenuItem.Text = "Restore Default Settings";
this.RestoreDefaultSettingsMenuItem.Click += new System.EventHandler(this.RestoreDefaultSettingsMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(189, 6);
//
// ExitMenuItem
//
this.ExitMenuItem.Name = "ExitMenuItem";
this.ExitMenuItem.ShortcutKeyDisplayString = "Alt+F4";
this.ExitMenuItem.Size = new System.Drawing.Size(192, 22);
this.ExitMenuItem.Text = "E&xit";
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
//
// StickyBox
//
this.StickyBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.StickyBox.AutoSize = true;
this.StickyBox.Location = new System.Drawing.Point(9, 283);
this.StickyBox.Name = "StickyBox";
this.StickyBox.Size = new System.Drawing.Size(55, 17);
this.StickyBox.TabIndex = 7;
this.StickyBox.TabStop = false;
this.StickyBox.Text = "Sticky";
this.StickyBox.UseVisualStyleBackColor = true;
this.StickyBox.CheckedChanged += new System.EventHandler(this.StickyBox_CheckedChanged);
//
// ClearButton
//
this.ClearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ClearButton.Location = new System.Drawing.Point(79, 279);
this.ClearButton.Name = "ClearButton";
this.ClearButton.Size = new System.Drawing.Size(75, 23);
this.ClearButton.TabIndex = 8;
this.ClearButton.TabStop = false;
this.ClearButton.Text = "&Clear";
this.ClearButton.UseVisualStyleBackColor = true;
this.ClearButton.Click += new System.EventHandler(this.ClearMenuItem_Click);
//
// addPlayerToolStripMenuItem
//
this.addPlayerToolStripMenuItem.Name = "addPlayerToolStripMenuItem";
this.addPlayerToolStripMenuItem.Size = new System.Drawing.Size(93, 20);
this.addPlayerToolStripMenuItem.Text = "Add Controllers";
this.addPlayerToolStripMenuItem.Click += new System.EventHandler(this.addPlayerToolStripMenuItem_Click);
//
// VirtualPadForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(452, 312);
this.Controls.Add(this.ClearButton);
this.Controls.Add(this.ControllerBox);
this.Controls.Add(this.StickyBox);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.MinimumSize = new System.Drawing.Size(100, 100);
this.Name = "VirtualPadForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Virtual Pads";
this.Load += new System.EventHandler(this.VirtualPadForm_Load);
this.contextMenuStrip1.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
@ -221,6 +230,7 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem AlwaysOnTopMenuItem;
private System.Windows.Forms.Button ClearButton;
private System.Windows.Forms.ToolStripMenuItem FloatingWindowMenuItem;
private System.Windows.Forms.ToolStripMenuItem FloatingWindowMenuItem;
private System.Windows.Forms.ToolStripMenuItem addPlayerToolStripMenuItem;
}
}

View File

@ -168,46 +168,33 @@ namespace BizHawk.Client.EmuHawk
{
case "A26":
ControllerBox.Controls.Add(new VirtualPadA26 { Location = new Point(8, 19), Controller = "P1" });
ControllerBox.Controls.Add(new VirtualPadA26 { Location = new Point(188, 19), Controller = "P2" });
ControllerBox.Controls.Add(new VirtualPadA26Control { Location = new Point(8, 109) });
break;
case "A78":
ControllerBox.Controls.Add(new VirtualPadA78 { Location = new Point(8, 19), Controller = "P1" });
ControllerBox.Controls.Add(new VirtualPadA78 { Location = new Point(150, 19), Controller = "P2" });
ControllerBox.Controls.Add(new VirtualPadA78Control { Location = new Point(8, 125) });
break;
case "NES":
ControllerBox.Controls.Add(new VirtualPadNES { Location = new Point(8, 19), Controller = "P1" });
ControllerBox.Controls.Add(new VirtualPadNES { Location = new Point(188, 19), Controller = "P2" });
ControllerBox.Controls.Add(new VirtualPadNESControl { Location = new Point(8, 109) });
break;
case "N64":
ControllerBox.Controls.Add(new VirtualPadN64 { Location = new Point(8, 19), Controller = "P1" });
ControllerBox.Controls.Add(new VirtualPadN64 { Location = new Point(208, 19), Controller = "P2" });
ControllerBox.Controls.Add(new VirtualPadN64 { Location = new Point(408, 19), Controller = "P3" });
ControllerBox.Controls.Add(new VirtualPadN64 { Location = new Point(608, 19), Controller = "P4" });
ControllerBox.Controls.Add(new VirtualPadN64Control { Location = new Point(8, 350) });
break;
case "SMS":
case "SG":
case "GG":
ControllerBox.Controls.Add(new VirtualPadSMS { Location = new Point(8, 19), Controller = "P1" });
ControllerBox.Controls.Add(new VirtualPadSMS { Location = new Point(188, 19), Controller = "P2" });
ControllerBox.Controls.Add(new VirtualPadSMSControl { Location = new Point(8, 109) });
break;
case "PCE":
case "PCECD":
case "SGX":
ControllerBox.Controls.Add(new VirtualPadPCE { Location = new Point(8, 19), Controller = "P1" });
ControllerBox.Controls.Add(new VirtualPadPCE { Location = new Point(188, 19), Controller = "P2" });
ControllerBox.Controls.Add(new VirtualPadPCE { Location = new Point(8, 109), Controller = "P3" });
ControllerBox.Controls.Add(new VirtualPadPCE { Location = new Point(188, 109), Controller = "P4" });
break;
case "SNES":
ControllerBox.Controls.Add(new VirtualPadSNES { Location = new Point(8, 19), Controller = "P1" });
ControllerBox.Controls.Add(new VirtualPadSNES { Location = new Point(188, 19), Controller = "P2" });
ControllerBox.Controls.Add(new VirtualPadSNES { Location = new Point(8, 95), Controller = "P3" });
ControllerBox.Controls.Add(new VirtualPadSNES { Location = new Point(188, 95), Controller = "P4" });
ControllerBox.Controls.Add(new VirtualPadSNESControl { Location = new Point(8, 170) });
break;
case "GB":
@ -220,23 +207,18 @@ namespace BizHawk.Client.EmuHawk
break;
case "GEN":
ControllerBox.Controls.Add(new VirtualPadGen6Button { Location = new Point(8, 19), Controller = "P1" });
ControllerBox.Controls.Add(new VirtualPadGen6Button { Location = new Point(195, 19), Controller = "P2" });
ControllerBox.Controls.Add(new VirtualPadNESControl { Location = new Point(8, 105) });
break;
case "Coleco":
var coleco1 = new VirtualPadColeco { Location = new Point(8, 19), Controller = "P1" };
var coleco2 = new VirtualPadColeco { Location = new Point(130, 19), Controller = "P2" };
ControllerBox.Controls.Add(coleco1);
ControllerBox.Controls.Add(coleco2);
break;
case "C64":
ControllerBox.Controls.Add(new VirtualPadC64Keyboard { Location = new Point(8, 19) });
ControllerBox.Controls.Add(new VirtualPadA26 { Location = new Point(8, 159), Controller = "P1" });
ControllerBox.Controls.Add(new VirtualPadA26 { Location = new Point(218, 159), Controller = "P2" });
break;
case "SAT":
ControllerBox.Controls.Add(new VirtualPadSaturn { Location = new Point(8, 19), Controller = "P1" });
ControllerBox.Controls.Add(new VirtualPadSaturn { Location = new Point(213, 19), Controller = "P2" });
ControllerBox.Controls.Add(new VirtualPadSaturnControl { Location = new Point(8, 125) });
break;
}
@ -344,6 +326,65 @@ namespace BizHawk.Client.EmuHawk
#endregion
private void addPlayerToolStripMenuItem_Click(object sender, EventArgs e)
{
switch (Global.Emulator.SystemId)
{
case "A26":
ControllerBox.Controls.Add(new VirtualPadA26 { Location = new Point(188, 19), Controller = "P2" });
break;
case "A78":
ControllerBox.Controls.Add(new VirtualPadA78 { Location = new Point(150, 19), Controller = "P2" });
break;
case "NES":
ControllerBox.Controls.Add(new VirtualPadNES { Location = new Point(188, 19), Controller = "P2" });
break;
case "N64":
ControllerBox.Controls.Add(new VirtualPadN64 { Location = new Point(208, 19), Controller = "P2" });
ControllerBox.Controls.Add(new VirtualPadN64 { Location = new Point(408, 19), Controller = "P3" });
ControllerBox.Controls.Add(new VirtualPadN64 { Location = new Point(608, 19), Controller = "P4" });
break;
case "SMS":
case "SG":
case "GG":
ControllerBox.Controls.Add(new VirtualPadSMS { Location = new Point(188, 19), Controller = "P2" });
break;
case "PCE":
case "PCECD":
case "SGX":
ControllerBox.Controls.Add(new VirtualPadPCE { Location = new Point(188, 19), Controller = "P2" });
ControllerBox.Controls.Add(new VirtualPadPCE { Location = new Point(8, 109), Controller = "P3" });
ControllerBox.Controls.Add(new VirtualPadPCE { Location = new Point(188, 109), Controller = "P4" });
break;
case "SNES":
ControllerBox.Controls.Add(new VirtualPadSNES { Location = new Point(188, 19), Controller = "P2" });
ControllerBox.Controls.Add(new VirtualPadSNES { Location = new Point(8, 95), Controller = "P3" });
ControllerBox.Controls.Add(new VirtualPadSNES { Location = new Point(188, 95), Controller = "P4" });
break;
case "GB":
case "GBC":
ControllerBox.Controls.Add(new VirtualPadGB { Location = new Point(8, 19), Controller = string.Empty });
ControllerBox.Controls.Add(new VirtualPadGBControl { Location = new Point(8, 109) });
break;
case "GBA":
ControllerBox.Controls.Add(new VirtualPadGBA { Location = new Point(8, 19), Controller = string.Empty });
break;
case "GEN":
ControllerBox.Controls.Add(new VirtualPadGen6Button { Location = new Point(195, 19), Controller = "P2" });
break;
case "Coleco":
var coleco2 = new VirtualPadColeco { Location = new Point(130, 19), Controller = "P2" };
ControllerBox.Controls.Add(coleco2);
break;
case "C64":
ControllerBox.Controls.Add(new VirtualPadA26 { Location = new Point(218, 159), Controller = "P2" });
break;
case "SAT":
ControllerBox.Controls.Add(new VirtualPadSaturn { Location = new Point(213, 19), Controller = "P2" });
break;
}
}
#endregion
}
}

View File

@ -28,309 +28,367 @@
/// </summary>
private void InitializeComponent()
{
this.ManualX = new System.Windows.Forms.NumericUpDown();
this.ManualY = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.CD = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.CR = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.CL = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.CU = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.BA = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.BB = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.BZ = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.BS = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.BR = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.BL = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.PL = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.PD = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.PR = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.PU = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.AnalogControl1 = new BizHawk.Client.EmuHawk.AnalogControlPanel();
((System.ComponentModel.ISupportInitialize)(this.ManualX)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ManualY)).BeginInit();
this.SuspendLayout();
//
// ManualX
//
this.ManualX.Location = new System.Drawing.Point(144, 30);
this.ManualX.Maximum = new decimal(new int[] {
this.ManualX = new System.Windows.Forms.NumericUpDown();
this.ManualY = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.CD = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.CR = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.CL = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.CU = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.BA = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.BB = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.BZ = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.BS = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.BR = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.BL = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.PL = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.PD = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.PR = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.PU = new BizHawk.Client.EmuHawk.VirtualPadButton();
this.AnalogControl1 = new BizHawk.Client.EmuHawk.AnalogControlPanel();
((System.ComponentModel.ISupportInitialize)(this.ManualX)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ManualY)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
this.SuspendLayout();
//
// ManualX
//
this.ManualX.Location = new System.Drawing.Point(144, 30);
this.ManualX.Maximum = new decimal(new int[] {
127,
0,
0,
0});
this.ManualX.Minimum = new decimal(new int[] {
128,
this.ManualX.Minimum = new decimal(new int[] {
127,
0,
0,
-2147483648});
this.ManualX.Name = "ManualX";
this.ManualX.Size = new System.Drawing.Size(47, 20);
this.ManualX.TabIndex = 20;
this.ManualX.ValueChanged += new System.EventHandler(this.ManualX_ValueChanged);
this.ManualX.KeyUp += new System.Windows.Forms.KeyEventHandler(this.ManualX_KeyUp);
//
// ManualY
//
this.ManualY.Location = new System.Drawing.Point(144, 69);
this.ManualY.Maximum = new decimal(new int[] {
this.ManualX.Name = "ManualX";
this.ManualX.Size = new System.Drawing.Size(47, 20);
this.ManualX.TabIndex = 20;
this.ManualX.ValueChanged += new System.EventHandler(this.ManualX_ValueChanged);
this.ManualX.KeyUp += new System.Windows.Forms.KeyEventHandler(this.ManualX_KeyUp);
//
// ManualY
//
this.ManualY.Location = new System.Drawing.Point(144, 69);
this.ManualY.Maximum = new decimal(new int[] {
127,
0,
0,
0});
this.ManualY.Minimum = new decimal(new int[] {
128,
this.ManualY.Minimum = new decimal(new int[] {
127,
0,
0,
-2147483648});
this.ManualY.Name = "ManualY";
this.ManualY.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.ManualY.Size = new System.Drawing.Size(47, 20);
this.ManualY.TabIndex = 21;
this.ManualY.ValueChanged += new System.EventHandler(this.ManualY_ValueChanged);
this.ManualY.KeyUp += new System.Windows.Forms.KeyEventHandler(this.ManualY_KeyUp);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(144, 14);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(14, 13);
this.label1.TabIndex = 22;
this.label1.Text = "X";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(144, 53);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(14, 13);
this.label2.TabIndex = 23;
this.label2.Text = "Y";
//
// CD
//
this.CD.Appearance = System.Windows.Forms.Appearance.Button;
this.CD.AutoSize = true;
this.CD.ForeColor = System.Drawing.Color.Black;
this.CD.Location = new System.Drawing.Point(147, 281);
this.CD.Name = "CD";
this.CD.Size = new System.Drawing.Size(31, 23);
this.CD.TabIndex = 17;
this.CD.TabStop = false;
this.CD.Text = "cD";
this.CD.UseVisualStyleBackColor = true;
//
// CR
//
this.CR.Appearance = System.Windows.Forms.Appearance.Button;
this.CR.AutoSize = true;
this.CR.ForeColor = System.Drawing.Color.Black;
this.CR.Location = new System.Drawing.Point(164, 258);
this.CR.Name = "CR";
this.CR.Size = new System.Drawing.Size(31, 23);
this.CR.TabIndex = 16;
this.CR.TabStop = false;
this.CR.Text = "cR";
this.CR.UseVisualStyleBackColor = true;
//
// CL
//
this.CL.Appearance = System.Windows.Forms.Appearance.Button;
this.CL.AutoSize = true;
this.CL.ForeColor = System.Drawing.Color.Black;
this.CL.Location = new System.Drawing.Point(129, 258);
this.CL.Name = "CL";
this.CL.Size = new System.Drawing.Size(29, 23);
this.CL.TabIndex = 15;
this.CL.TabStop = false;
this.CL.Text = "cL";
this.CL.UseVisualStyleBackColor = true;
//
// CU
//
this.CU.Appearance = System.Windows.Forms.Appearance.Button;
this.CU.AutoSize = true;
this.CU.ForeColor = System.Drawing.Color.Black;
this.CU.Location = new System.Drawing.Point(147, 235);
this.CU.Name = "CU";
this.CU.Size = new System.Drawing.Size(31, 23);
this.CU.TabIndex = 14;
this.CU.TabStop = false;
this.CU.Text = "cU";
this.CU.UseVisualStyleBackColor = true;
//
// BA
//
this.BA.Appearance = System.Windows.Forms.Appearance.Button;
this.BA.AutoSize = true;
this.BA.ForeColor = System.Drawing.Color.Black;
this.BA.Location = new System.Drawing.Point(113, 206);
this.BA.Name = "BA";
this.BA.Size = new System.Drawing.Size(24, 23);
this.BA.TabIndex = 13;
this.BA.TabStop = false;
this.BA.Text = "A";
this.BA.UseVisualStyleBackColor = true;
//
// BB
//
this.BB.Appearance = System.Windows.Forms.Appearance.Button;
this.BB.AutoSize = true;
this.BB.ForeColor = System.Drawing.Color.Black;
this.BB.Location = new System.Drawing.Point(83, 195);
this.BB.Name = "BB";
this.BB.Size = new System.Drawing.Size(24, 23);
this.BB.TabIndex = 12;
this.BB.TabStop = false;
this.BB.Text = "B";
this.BB.UseVisualStyleBackColor = true;
//
// BZ
//
this.BZ.Appearance = System.Windows.Forms.Appearance.Button;
this.BZ.AutoSize = true;
this.BZ.ForeColor = System.Drawing.Color.Black;
this.BZ.Location = new System.Drawing.Point(74, 245);
this.BZ.Name = "BZ";
this.BZ.Size = new System.Drawing.Size(24, 23);
this.BZ.TabIndex = 11;
this.BZ.TabStop = false;
this.BZ.Text = "Z";
this.BZ.UseVisualStyleBackColor = true;
//
// BS
//
this.BS.Appearance = System.Windows.Forms.Appearance.Button;
this.BS.AutoSize = true;
this.BS.ForeColor = System.Drawing.Color.Black;
this.BS.Location = new System.Drawing.Point(87, 157);
this.BS.Name = "BS";
this.BS.Size = new System.Drawing.Size(24, 23);
this.BS.TabIndex = 10;
this.BS.TabStop = false;
this.BS.Text = "S";
this.BS.UseVisualStyleBackColor = true;
//
// BR
//
this.BR.Appearance = System.Windows.Forms.Appearance.Button;
this.BR.AutoSize = true;
this.BR.ForeColor = System.Drawing.Color.Black;
this.BR.Location = new System.Drawing.Point(172, 148);
this.BR.Name = "BR";
this.BR.Size = new System.Drawing.Size(25, 23);
this.BR.TabIndex = 9;
this.BR.TabStop = false;
this.BR.Text = "R";
this.BR.UseVisualStyleBackColor = true;
//
// BL
//
this.BL.Appearance = System.Windows.Forms.Appearance.Button;
this.BL.AutoSize = true;
this.BL.ForeColor = System.Drawing.Color.Black;
this.BL.Location = new System.Drawing.Point(3, 148);
this.BL.Name = "BL";
this.BL.Size = new System.Drawing.Size(23, 23);
this.BL.TabIndex = 8;
this.BL.TabStop = false;
this.BL.Text = "L";
this.BL.UseVisualStyleBackColor = true;
//
// PL
//
this.PL.Appearance = System.Windows.Forms.Appearance.Button;
this.PL.AutoSize = true;
this.PL.ForeColor = System.Drawing.Color.Black;
this.PL.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Back;
this.PL.Location = new System.Drawing.Point(3, 207);
this.PL.Name = "PL";
this.PL.Size = new System.Drawing.Size(22, 22);
this.PL.TabIndex = 7;
this.PL.TabStop = false;
this.PL.UseVisualStyleBackColor = true;
//
// PD
//
this.PD.Appearance = System.Windows.Forms.Appearance.Button;
this.PD.AutoSize = true;
this.PD.ForeColor = System.Drawing.Color.Black;
this.PD.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.BlueDown;
this.PD.Location = new System.Drawing.Point(24, 216);
this.PD.Name = "PD";
this.PD.Size = new System.Drawing.Size(22, 22);
this.PD.TabIndex = 6;
this.PD.TabStop = false;
this.PD.UseVisualStyleBackColor = true;
//
// PR
//
this.PR.Appearance = System.Windows.Forms.Appearance.Button;
this.PR.AutoSize = true;
this.PR.ForeColor = System.Drawing.Color.Black;
this.PR.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Forward;
this.PR.Location = new System.Drawing.Point(45, 207);
this.PR.Name = "PR";
this.PR.Size = new System.Drawing.Size(22, 22);
this.PR.TabIndex = 5;
this.PR.TabStop = false;
this.PR.UseVisualStyleBackColor = true;
//
// PU
//
this.PU.Appearance = System.Windows.Forms.Appearance.Button;
this.PU.AutoSize = true;
this.PU.ForeColor = System.Drawing.Color.Black;
this.PU.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.BlueUp;
this.PU.Location = new System.Drawing.Point(24, 195);
this.PU.Name = "PU";
this.PU.Size = new System.Drawing.Size(22, 22);
this.PU.TabIndex = 4;
this.PU.TabStop = false;
this.PU.UseVisualStyleBackColor = true;
//
// AnalogControl1
//
this.AnalogControl1.BackColor = System.Drawing.Color.Transparent;
this.AnalogControl1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.AnalogControl1.Location = new System.Drawing.Point(6, 14);
this.AnalogControl1.Name = "AnalogControl1";
this.AnalogControl1.Size = new System.Drawing.Size(132, 132);
this.AnalogControl1.TabIndex = 0;
this.AnalogControl1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.AnalogControl1_MouseClick);
this.AnalogControl1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.AnalogControl1_MouseMove);
//
// VirtualPadN64
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.ManualY);
this.Controls.Add(this.ManualX);
this.Controls.Add(this.CD);
this.Controls.Add(this.CR);
this.Controls.Add(this.CL);
this.Controls.Add(this.CU);
this.Controls.Add(this.BA);
this.Controls.Add(this.BB);
this.Controls.Add(this.BZ);
this.Controls.Add(this.BS);
this.Controls.Add(this.BR);
this.Controls.Add(this.BL);
this.Controls.Add(this.PL);
this.Controls.Add(this.PD);
this.Controls.Add(this.PR);
this.Controls.Add(this.PU);
this.Controls.Add(this.AnalogControl1);
this.Name = "VirtualPadN64";
this.Size = new System.Drawing.Size(200, 316);
this.Load += new System.EventHandler(this.UserControl1_Load);
((System.ComponentModel.ISupportInitialize)(this.ManualX)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ManualY)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
this.ManualY.Name = "ManualY";
this.ManualY.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.ManualY.Size = new System.Drawing.Size(47, 20);
this.ManualY.TabIndex = 21;
this.ManualY.ValueChanged += new System.EventHandler(this.ManualY_ValueChanged);
this.ManualY.KeyUp += new System.Windows.Forms.KeyEventHandler(this.ManualY_KeyUp);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(144, 14);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(14, 13);
this.label1.TabIndex = 22;
this.label1.Text = "X";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(144, 53);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(14, 13);
this.label2.TabIndex = 23;
this.label2.Text = "Y";
//
// numericUpDown1
//
this.numericUpDown1.Location = new System.Drawing.Point(4, 269);
this.numericUpDown1.Maximum = new decimal(new int[] {
127,
0,
0,
0});
this.numericUpDown1.Minimum = new decimal(new int[] {
127,
0,
0,
-2147483648});
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(55, 20);
this.numericUpDown1.TabIndex = 24;
this.numericUpDown1.TabStop = false;
this.numericUpDown1.Value = new decimal(new int[] {
127,
0,
0,
0});
this.numericUpDown1.Visible = false;
this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
//
// numericUpDown2
//
this.numericUpDown2.Location = new System.Drawing.Point(4, 292);
this.numericUpDown2.Maximum = new decimal(new int[] {
127,
0,
0,
0});
this.numericUpDown2.Minimum = new decimal(new int[] {
127,
0,
0,
-2147483648});
this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.Size = new System.Drawing.Size(55, 20);
this.numericUpDown2.TabIndex = 25;
this.numericUpDown2.TabStop = false;
this.numericUpDown2.Value = new decimal(new int[] {
127,
0,
0,
-2147483648});
this.numericUpDown2.Visible = false;
this.numericUpDown2.ValueChanged += new System.EventHandler(this.numericUpDown2_ValueChanged);
//
// CD
//
this.CD.Appearance = System.Windows.Forms.Appearance.Button;
this.CD.AutoSize = true;
this.CD.ForeColor = System.Drawing.Color.Black;
this.CD.Location = new System.Drawing.Point(147, 281);
this.CD.Name = "CD";
this.CD.Size = new System.Drawing.Size(31, 23);
this.CD.TabIndex = 17;
this.CD.TabStop = false;
this.CD.Text = "cD";
this.CD.UseVisualStyleBackColor = true;
//
// CR
//
this.CR.Appearance = System.Windows.Forms.Appearance.Button;
this.CR.AutoSize = true;
this.CR.ForeColor = System.Drawing.Color.Black;
this.CR.Location = new System.Drawing.Point(164, 258);
this.CR.Name = "CR";
this.CR.Size = new System.Drawing.Size(31, 23);
this.CR.TabIndex = 16;
this.CR.TabStop = false;
this.CR.Text = "cR";
this.CR.UseVisualStyleBackColor = true;
//
// CL
//
this.CL.Appearance = System.Windows.Forms.Appearance.Button;
this.CL.AutoSize = true;
this.CL.ForeColor = System.Drawing.Color.Black;
this.CL.Location = new System.Drawing.Point(129, 258);
this.CL.Name = "CL";
this.CL.Size = new System.Drawing.Size(29, 23);
this.CL.TabIndex = 15;
this.CL.TabStop = false;
this.CL.Text = "cL";
this.CL.UseVisualStyleBackColor = true;
//
// CU
//
this.CU.Appearance = System.Windows.Forms.Appearance.Button;
this.CU.AutoSize = true;
this.CU.ForeColor = System.Drawing.Color.Black;
this.CU.Location = new System.Drawing.Point(147, 235);
this.CU.Name = "CU";
this.CU.Size = new System.Drawing.Size(31, 23);
this.CU.TabIndex = 14;
this.CU.TabStop = false;
this.CU.Text = "cU";
this.CU.UseVisualStyleBackColor = true;
//
// BA
//
this.BA.Appearance = System.Windows.Forms.Appearance.Button;
this.BA.AutoSize = true;
this.BA.ForeColor = System.Drawing.Color.Black;
this.BA.Location = new System.Drawing.Point(113, 206);
this.BA.Name = "BA";
this.BA.Size = new System.Drawing.Size(24, 23);
this.BA.TabIndex = 13;
this.BA.TabStop = false;
this.BA.Text = "A";
this.BA.UseVisualStyleBackColor = true;
//
// BB
//
this.BB.Appearance = System.Windows.Forms.Appearance.Button;
this.BB.AutoSize = true;
this.BB.ForeColor = System.Drawing.Color.Black;
this.BB.Location = new System.Drawing.Point(83, 195);
this.BB.Name = "BB";
this.BB.Size = new System.Drawing.Size(24, 23);
this.BB.TabIndex = 12;
this.BB.TabStop = false;
this.BB.Text = "B";
this.BB.UseVisualStyleBackColor = true;
//
// BZ
//
this.BZ.Appearance = System.Windows.Forms.Appearance.Button;
this.BZ.AutoSize = true;
this.BZ.ForeColor = System.Drawing.Color.Black;
this.BZ.Location = new System.Drawing.Point(74, 245);
this.BZ.Name = "BZ";
this.BZ.Size = new System.Drawing.Size(24, 23);
this.BZ.TabIndex = 11;
this.BZ.TabStop = false;
this.BZ.Text = "Z";
this.BZ.UseVisualStyleBackColor = true;
//
// BS
//
this.BS.Appearance = System.Windows.Forms.Appearance.Button;
this.BS.AutoSize = true;
this.BS.ForeColor = System.Drawing.Color.Black;
this.BS.Location = new System.Drawing.Point(87, 157);
this.BS.Name = "BS";
this.BS.Size = new System.Drawing.Size(24, 23);
this.BS.TabIndex = 10;
this.BS.TabStop = false;
this.BS.Text = "S";
this.BS.UseVisualStyleBackColor = true;
//
// BR
//
this.BR.Appearance = System.Windows.Forms.Appearance.Button;
this.BR.AutoSize = true;
this.BR.ForeColor = System.Drawing.Color.Black;
this.BR.Location = new System.Drawing.Point(172, 148);
this.BR.Name = "BR";
this.BR.Size = new System.Drawing.Size(25, 23);
this.BR.TabIndex = 9;
this.BR.TabStop = false;
this.BR.Text = "R";
this.BR.UseVisualStyleBackColor = true;
//
// BL
//
this.BL.Appearance = System.Windows.Forms.Appearance.Button;
this.BL.AutoSize = true;
this.BL.ForeColor = System.Drawing.Color.Black;
this.BL.Location = new System.Drawing.Point(3, 148);
this.BL.Name = "BL";
this.BL.Size = new System.Drawing.Size(23, 23);
this.BL.TabIndex = 8;
this.BL.TabStop = false;
this.BL.Text = "L";
this.BL.UseVisualStyleBackColor = true;
//
// PL
//
this.PL.Appearance = System.Windows.Forms.Appearance.Button;
this.PL.AutoSize = true;
this.PL.ForeColor = System.Drawing.Color.Black;
this.PL.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Back;
this.PL.Location = new System.Drawing.Point(3, 207);
this.PL.Name = "PL";
this.PL.Size = new System.Drawing.Size(22, 22);
this.PL.TabIndex = 7;
this.PL.TabStop = false;
this.PL.UseVisualStyleBackColor = true;
//
// PD
//
this.PD.Appearance = System.Windows.Forms.Appearance.Button;
this.PD.AutoSize = true;
this.PD.ForeColor = System.Drawing.Color.Black;
this.PD.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.BlueDown;
this.PD.Location = new System.Drawing.Point(24, 216);
this.PD.Name = "PD";
this.PD.Size = new System.Drawing.Size(22, 22);
this.PD.TabIndex = 6;
this.PD.TabStop = false;
this.PD.UseVisualStyleBackColor = true;
//
// PR
//
this.PR.Appearance = System.Windows.Forms.Appearance.Button;
this.PR.AutoSize = true;
this.PR.ForeColor = System.Drawing.Color.Black;
this.PR.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Forward;
this.PR.Location = new System.Drawing.Point(45, 207);
this.PR.Name = "PR";
this.PR.Size = new System.Drawing.Size(22, 22);
this.PR.TabIndex = 5;
this.PR.TabStop = false;
this.PR.UseVisualStyleBackColor = true;
//
// PU
//
this.PU.Appearance = System.Windows.Forms.Appearance.Button;
this.PU.AutoSize = true;
this.PU.ForeColor = System.Drawing.Color.Black;
this.PU.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.BlueUp;
this.PU.Location = new System.Drawing.Point(24, 195);
this.PU.Name = "PU";
this.PU.Size = new System.Drawing.Size(22, 22);
this.PU.TabIndex = 4;
this.PU.TabStop = false;
this.PU.UseVisualStyleBackColor = true;
//
// AnalogControl1
//
this.AnalogControl1.BackColor = System.Drawing.Color.Transparent;
this.AnalogControl1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.AnalogControl1.Location = new System.Drawing.Point(6, 14);
this.AnalogControl1.Name = "AnalogControl1";
this.AnalogControl1.Size = new System.Drawing.Size(132, 132);
this.AnalogControl1.TabIndex = 0;
this.AnalogControl1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.AnalogControl1_MouseClick);
this.AnalogControl1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.AnalogControl1_MouseMove);
//
// VirtualPadN64
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.numericUpDown2);
this.Controls.Add(this.numericUpDown1);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.ManualY);
this.Controls.Add(this.ManualX);
this.Controls.Add(this.CD);
this.Controls.Add(this.CR);
this.Controls.Add(this.CL);
this.Controls.Add(this.CU);
this.Controls.Add(this.BA);
this.Controls.Add(this.BB);
this.Controls.Add(this.BZ);
this.Controls.Add(this.BS);
this.Controls.Add(this.BR);
this.Controls.Add(this.BL);
this.Controls.Add(this.PL);
this.Controls.Add(this.PD);
this.Controls.Add(this.PR);
this.Controls.Add(this.PU);
this.Controls.Add(this.AnalogControl1);
this.Name = "VirtualPadN64";
this.Size = new System.Drawing.Size(200, 316);
this.Load += new System.EventHandler(this.UserControl1_Load);
((System.ComponentModel.ISupportInitialize)(this.ManualX)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ManualY)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
@ -355,5 +413,7 @@
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.NumericUpDown ManualX;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.NumericUpDown numericUpDown2;
}
}

View File

@ -25,7 +25,12 @@ namespace BizHawk.Client.EmuHawk
}
private void UserControl1_Load(object sender, EventArgs e)
{
{
if (Controller == "P1")
{
numericUpDown1.Visible = true;
numericUpDown2.Visible = true;
}
PU.ControllerButton = Controller + " Up";
PD.ControllerButton = Controller + " Down";
PL.ControllerButton = Controller + " Left";
@ -219,5 +224,21 @@ namespace BizHawk.Client.EmuHawk
AnalogControl1.Y = y;
AnalogControl1.Refresh();
}
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
AnalogControlPanel.Max = (int)numericUpDown1.Value;
ManualX.Maximum = (int)numericUpDown1.Value;
ManualY.Maximum = (int)numericUpDown1.Value;
AnalogControl1.Refresh();
}
private void numericUpDown2_ValueChanged(object sender, EventArgs e)
{
AnalogControlPanel.Min = (int)numericUpDown2.Value;
ManualX.Minimum = (int)numericUpDown2.Value;
ManualY.Minimum = (int)numericUpDown2.Value;
AnalogControl1.Refresh();
}
}
}