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

View File

@ -28,68 +28,70 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VirtualPadForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VirtualPadForm));
this.ControllerBox = new System.Windows.Forms.GroupBox(); this.ControllerBox = new System.Windows.Forms.GroupBox();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ClearMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ClearMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1 = new MenuStripEx(); this.menuStrip1 = new MenuStripEx();
this.OptionsSubMenu = new System.Windows.Forms.ToolStripMenuItem(); this.OptionsSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.AutoloadMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.AutoloadMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SaveWindowPositionMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SaveWindowPositionMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AlwaysOnTopMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.AlwaysOnTopMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.FloatingWindowMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.FloatingWindowMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.RestoreDefaultSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.RestoreDefaultSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.StickyBox = new System.Windows.Forms.CheckBox(); this.StickyBox = new System.Windows.Forms.CheckBox();
this.ClearButton = new System.Windows.Forms.Button(); this.ClearButton = new System.Windows.Forms.Button();
this.contextMenuStrip1.SuspendLayout(); this.addPlayerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout(); this.menuStrip1.SuspendLayout();
// this.SuspendLayout();
// ControllerBox //
// // ControllerBox
this.ControllerBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) //
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.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.ControllerBox.ContextMenuStrip = this.contextMenuStrip1; this.ControllerBox.ContextMenuStrip = this.contextMenuStrip1;
this.ControllerBox.Location = new System.Drawing.Point(9, 26); this.ControllerBox.Location = new System.Drawing.Point(9, 26);
this.ControllerBox.Name = "ControllerBox"; this.ControllerBox.Name = "ControllerBox";
this.ControllerBox.Size = new System.Drawing.Size(431, 251); this.ControllerBox.Size = new System.Drawing.Size(431, 251);
this.ControllerBox.TabIndex = 5; this.ControllerBox.TabIndex = 5;
this.ControllerBox.TabStop = false; this.ControllerBox.TabStop = false;
this.ControllerBox.Text = "Controllers"; this.ControllerBox.Text = "Controllers";
// //
// contextMenuStrip1 // contextMenuStrip1
// //
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ClearMenuItem}); this.ClearMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(102, 26); this.contextMenuStrip1.Size = new System.Drawing.Size(100, 26);
// //
// ClearMenuItem // ClearMenuItem
// //
this.ClearMenuItem.Name = "ClearMenuItem"; this.ClearMenuItem.Name = "ClearMenuItem";
this.ClearMenuItem.Size = new System.Drawing.Size(101, 22); this.ClearMenuItem.Size = new System.Drawing.Size(99, 22);
this.ClearMenuItem.Text = "&Clear"; this.ClearMenuItem.Text = "&Clear";
this.ClearMenuItem.Click += new System.EventHandler(this.ClearMenuItem_Click); this.ClearMenuItem.Click += new System.EventHandler(this.ClearMenuItem_Click);
// //
// menuStrip1 // menuStrip1
// //
this.menuStrip1.ClickThrough = true; this.menuStrip1.ClickThrough = true;
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.OptionsSubMenu}); this.OptionsSubMenu,
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.addPlayerToolStripMenuItem});
this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Size = new System.Drawing.Size(452, 24); this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.TabIndex = 6; this.menuStrip1.Size = new System.Drawing.Size(452, 24);
this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.TabIndex = 6;
// this.menuStrip1.Text = "menuStrip1";
// OptionsSubMenu //
// // OptionsSubMenu
this.OptionsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { //
this.OptionsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.AutoloadMenuItem, this.AutoloadMenuItem,
this.SaveWindowPositionMenuItem, this.SaveWindowPositionMenuItem,
this.AlwaysOnTopMenuItem, this.AlwaysOnTopMenuItem,
@ -98,110 +100,117 @@
this.RestoreDefaultSettingsMenuItem, this.RestoreDefaultSettingsMenuItem,
this.toolStripSeparator1, this.toolStripSeparator1,
this.ExitMenuItem}); this.ExitMenuItem});
this.OptionsSubMenu.Name = "OptionsSubMenu"; this.OptionsSubMenu.Name = "OptionsSubMenu";
this.OptionsSubMenu.Size = new System.Drawing.Size(61, 20); this.OptionsSubMenu.Size = new System.Drawing.Size(56, 20);
this.OptionsSubMenu.Text = "&Options"; this.OptionsSubMenu.Text = "&Options";
this.OptionsSubMenu.DropDownOpened += new System.EventHandler(this.OptionsSubMenu_DropDownOpened); this.OptionsSubMenu.DropDownOpened += new System.EventHandler(this.OptionsSubMenu_DropDownOpened);
// //
// AutoloadMenuItem // AutoloadMenuItem
// //
this.AutoloadMenuItem.Name = "AutoloadMenuItem"; this.AutoloadMenuItem.Name = "AutoloadMenuItem";
this.AutoloadMenuItem.Size = new System.Drawing.Size(199, 22); this.AutoloadMenuItem.Size = new System.Drawing.Size(192, 22);
this.AutoloadMenuItem.Text = "&Autoload"; this.AutoloadMenuItem.Text = "&Autoload";
this.AutoloadMenuItem.Click += new System.EventHandler(this.AutoloadMenuItem_Click); this.AutoloadMenuItem.Click += new System.EventHandler(this.AutoloadMenuItem_Click);
// //
// SaveWindowPositionMenuItem // SaveWindowPositionMenuItem
// //
this.SaveWindowPositionMenuItem.Name = "SaveWindowPositionMenuItem"; this.SaveWindowPositionMenuItem.Name = "SaveWindowPositionMenuItem";
this.SaveWindowPositionMenuItem.Size = new System.Drawing.Size(199, 22); this.SaveWindowPositionMenuItem.Size = new System.Drawing.Size(192, 22);
this.SaveWindowPositionMenuItem.Text = "&Save Window Position"; this.SaveWindowPositionMenuItem.Text = "&Save Window Position";
this.SaveWindowPositionMenuItem.Click += new System.EventHandler(this.SaveWindowPositionMenuItem_Click); this.SaveWindowPositionMenuItem.Click += new System.EventHandler(this.SaveWindowPositionMenuItem_Click);
// //
// AlwaysOnTopMenuItem // AlwaysOnTopMenuItem
// //
this.AlwaysOnTopMenuItem.Name = "AlwaysOnTopMenuItem"; this.AlwaysOnTopMenuItem.Name = "AlwaysOnTopMenuItem";
this.AlwaysOnTopMenuItem.Size = new System.Drawing.Size(199, 22); this.AlwaysOnTopMenuItem.Size = new System.Drawing.Size(192, 22);
this.AlwaysOnTopMenuItem.Text = "Always On Top"; this.AlwaysOnTopMenuItem.Text = "Always On Top";
this.AlwaysOnTopMenuItem.Click += new System.EventHandler(this.AlwaysOnTopMenuItem_Click); this.AlwaysOnTopMenuItem.Click += new System.EventHandler(this.AlwaysOnTopMenuItem_Click);
// //
// FloatingWindowMenuItem // FloatingWindowMenuItem
// //
this.FloatingWindowMenuItem.Name = "FloatingWindowMenuItem"; this.FloatingWindowMenuItem.Name = "FloatingWindowMenuItem";
this.FloatingWindowMenuItem.Size = new System.Drawing.Size(199, 22); this.FloatingWindowMenuItem.Size = new System.Drawing.Size(192, 22);
this.FloatingWindowMenuItem.Text = "Floating Window"; this.FloatingWindowMenuItem.Text = "Floating Window";
this.FloatingWindowMenuItem.Click += new System.EventHandler(this.FloatingWindowMenuItem_Click); this.FloatingWindowMenuItem.Click += new System.EventHandler(this.FloatingWindowMenuItem_Click);
// //
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(196, 6); this.toolStripSeparator2.Size = new System.Drawing.Size(189, 6);
// //
// RestoreDefaultSettingsMenuItem // RestoreDefaultSettingsMenuItem
// //
this.RestoreDefaultSettingsMenuItem.Name = "RestoreDefaultSettingsMenuItem"; this.RestoreDefaultSettingsMenuItem.Name = "RestoreDefaultSettingsMenuItem";
this.RestoreDefaultSettingsMenuItem.Size = new System.Drawing.Size(199, 22); this.RestoreDefaultSettingsMenuItem.Size = new System.Drawing.Size(192, 22);
this.RestoreDefaultSettingsMenuItem.Text = "Restore Default Settings"; this.RestoreDefaultSettingsMenuItem.Text = "Restore Default Settings";
this.RestoreDefaultSettingsMenuItem.Click += new System.EventHandler(this.RestoreDefaultSettingsMenuItem_Click); this.RestoreDefaultSettingsMenuItem.Click += new System.EventHandler(this.RestoreDefaultSettingsMenuItem_Click);
// //
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(196, 6); this.toolStripSeparator1.Size = new System.Drawing.Size(189, 6);
// //
// ExitMenuItem // ExitMenuItem
// //
this.ExitMenuItem.Name = "ExitMenuItem"; this.ExitMenuItem.Name = "ExitMenuItem";
this.ExitMenuItem.ShortcutKeyDisplayString = "Alt+F4"; this.ExitMenuItem.ShortcutKeyDisplayString = "Alt+F4";
this.ExitMenuItem.Size = new System.Drawing.Size(199, 22); this.ExitMenuItem.Size = new System.Drawing.Size(192, 22);
this.ExitMenuItem.Text = "E&xit"; this.ExitMenuItem.Text = "E&xit";
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click); this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
// //
// StickyBox // StickyBox
// //
this.StickyBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.StickyBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.StickyBox.AutoSize = true; this.StickyBox.AutoSize = true;
this.StickyBox.Location = new System.Drawing.Point(9, 283); this.StickyBox.Location = new System.Drawing.Point(9, 283);
this.StickyBox.Name = "StickyBox"; this.StickyBox.Name = "StickyBox";
this.StickyBox.Size = new System.Drawing.Size(55, 17); this.StickyBox.Size = new System.Drawing.Size(55, 17);
this.StickyBox.TabIndex = 7; this.StickyBox.TabIndex = 7;
this.StickyBox.TabStop = false; this.StickyBox.TabStop = false;
this.StickyBox.Text = "Sticky"; this.StickyBox.Text = "Sticky";
this.StickyBox.UseVisualStyleBackColor = true; this.StickyBox.UseVisualStyleBackColor = true;
this.StickyBox.CheckedChanged += new System.EventHandler(this.StickyBox_CheckedChanged); this.StickyBox.CheckedChanged += new System.EventHandler(this.StickyBox_CheckedChanged);
// //
// ClearButton // ClearButton
// //
this.ClearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 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.Location = new System.Drawing.Point(79, 279);
this.ClearButton.Name = "ClearButton"; this.ClearButton.Name = "ClearButton";
this.ClearButton.Size = new System.Drawing.Size(75, 23); this.ClearButton.Size = new System.Drawing.Size(75, 23);
this.ClearButton.TabIndex = 8; this.ClearButton.TabIndex = 8;
this.ClearButton.TabStop = false; this.ClearButton.TabStop = false;
this.ClearButton.Text = "&Clear"; this.ClearButton.Text = "&Clear";
this.ClearButton.UseVisualStyleBackColor = true; this.ClearButton.UseVisualStyleBackColor = true;
this.ClearButton.Click += new System.EventHandler(this.ClearMenuItem_Click); this.ClearButton.Click += new System.EventHandler(this.ClearMenuItem_Click);
// //
// VirtualPadForm // addPlayerToolStripMenuItem
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.addPlayerToolStripMenuItem.Name = "addPlayerToolStripMenuItem";
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.addPlayerToolStripMenuItem.Size = new System.Drawing.Size(93, 20);
this.ClientSize = new System.Drawing.Size(452, 312); this.addPlayerToolStripMenuItem.Text = "Add Controllers";
this.Controls.Add(this.ClearButton); this.addPlayerToolStripMenuItem.Click += new System.EventHandler(this.addPlayerToolStripMenuItem_Click);
this.Controls.Add(this.ControllerBox); //
this.Controls.Add(this.StickyBox); // VirtualPadForm
this.Controls.Add(this.menuStrip1); //
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.MainMenuStrip = this.menuStrip1; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.MinimumSize = new System.Drawing.Size(100, 100); this.ClientSize = new System.Drawing.Size(452, 312);
this.Name = "VirtualPadForm"; this.Controls.Add(this.ClearButton);
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Controls.Add(this.ControllerBox);
this.Text = "Virtual Pads"; this.Controls.Add(this.StickyBox);
this.Load += new System.EventHandler(this.VirtualPadForm_Load); this.Controls.Add(this.menuStrip1);
this.contextMenuStrip1.ResumeLayout(false); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.menuStrip1.ResumeLayout(false); this.MainMenuStrip = this.menuStrip1;
this.menuStrip1.PerformLayout(); this.MinimumSize = new System.Drawing.Size(100, 100);
this.ResumeLayout(false); this.Name = "VirtualPadForm";
this.PerformLayout(); 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.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem AlwaysOnTopMenuItem; private System.Windows.Forms.ToolStripMenuItem AlwaysOnTopMenuItem;
private System.Windows.Forms.Button ClearButton; 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": case "A26":
ControllerBox.Controls.Add(new VirtualPadA26 { Location = new Point(8, 19), Controller = "P1" }); 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) }); ControllerBox.Controls.Add(new VirtualPadA26Control { Location = new Point(8, 109) });
break; break;
case "A78": case "A78":
ControllerBox.Controls.Add(new VirtualPadA78 { Location = new Point(8, 19), Controller = "P1" }); 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) }); ControllerBox.Controls.Add(new VirtualPadA78Control { Location = new Point(8, 125) });
break; break;
case "NES": case "NES":
ControllerBox.Controls.Add(new VirtualPadNES { Location = new Point(8, 19), Controller = "P1" }); 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) }); ControllerBox.Controls.Add(new VirtualPadNESControl { Location = new Point(8, 109) });
break; break;
case "N64": case "N64":
ControllerBox.Controls.Add(new VirtualPadN64 { Location = new Point(8, 19), Controller = "P1" }); 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) }); ControllerBox.Controls.Add(new VirtualPadN64Control { Location = new Point(8, 350) });
break; break;
case "SMS": case "SMS":
case "SG": case "SG":
case "GG": case "GG":
ControllerBox.Controls.Add(new VirtualPadSMS { Location = new Point(8, 19), Controller = "P1" }); 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) }); ControllerBox.Controls.Add(new VirtualPadSMSControl { Location = new Point(8, 109) });
break; break;
case "PCE": case "PCE":
case "PCECD": case "PCECD":
case "SGX": case "SGX":
ControllerBox.Controls.Add(new VirtualPadPCE { Location = new Point(8, 19), Controller = "P1" }); 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; break;
case "SNES": case "SNES":
ControllerBox.Controls.Add(new VirtualPadSNES { Location = new Point(8, 19), Controller = "P1" }); 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) }); ControllerBox.Controls.Add(new VirtualPadSNESControl { Location = new Point(8, 170) });
break; break;
case "GB": case "GB":
@ -220,23 +207,18 @@ namespace BizHawk.Client.EmuHawk
break; break;
case "GEN": case "GEN":
ControllerBox.Controls.Add(new VirtualPadGen6Button { Location = new Point(8, 19), Controller = "P1" }); 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) }); ControllerBox.Controls.Add(new VirtualPadNESControl { Location = new Point(8, 105) });
break; break;
case "Coleco": case "Coleco":
var coleco1 = new VirtualPadColeco { Location = new Point(8, 19), Controller = "P1" }; 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(coleco1);
ControllerBox.Controls.Add(coleco2);
break; break;
case "C64": case "C64":
ControllerBox.Controls.Add(new VirtualPadC64Keyboard { Location = new Point(8, 19) }); 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(8, 159), Controller = "P1" });
ControllerBox.Controls.Add(new VirtualPadA26 { Location = new Point(218, 159), Controller = "P2" });
break; break;
case "SAT": case "SAT":
ControllerBox.Controls.Add(new VirtualPadSaturn { Location = new Point(8, 19), Controller = "P1" }); 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) }); ControllerBox.Controls.Add(new VirtualPadSaturnControl { Location = new Point(8, 125) });
break; break;
} }
@ -344,6 +326,65 @@ namespace BizHawk.Client.EmuHawk
#endregion #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 #endregion
} }
} }

View File

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