VirtualPad tool - fix resizing, fix clear button on coleco pad, add to Toolbox Dialog, Toolbox dialog - dynamically resize height based on number of tools in the box

This commit is contained in:
adelikat 2012-11-18 05:31:31 +00:00
parent b7f9a99250
commit 9ebc848d26
4 changed files with 28 additions and 10 deletions

View File

@ -44,6 +44,7 @@
this.KeypadTool = new System.Windows.Forms.ToolStripButton(); this.KeypadTool = new System.Windows.Forms.ToolStripButton();
this.GameboyDebuggerTool = new System.Windows.Forms.ToolStripButton(); this.GameboyDebuggerTool = new System.Windows.Forms.ToolStripButton();
this.SNESGraphicsDebuggerButton = new System.Windows.Forms.ToolStripButton(); this.SNESGraphicsDebuggerButton = new System.Windows.Forms.ToolStripButton();
this.toolStripButton6 = new System.Windows.Forms.ToolStripButton();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -58,6 +59,7 @@
this.toolStripButton4, this.toolStripButton4,
this.HexEditor, this.HexEditor,
this.toolStripButton5, this.toolStripButton5,
this.toolStripButton6,
this.TAStudioButton, this.TAStudioButton,
this.NESDebugger, this.NESDebugger,
this.NESPPU, this.NESPPU,
@ -69,7 +71,7 @@
this.toolStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table; this.toolStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table;
this.toolStrip1.Location = new System.Drawing.Point(9, 11); this.toolStrip1.Location = new System.Drawing.Point(9, 11);
this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(100, 306); this.toolStrip1.Size = new System.Drawing.Size(100, 348);
this.toolStrip1.TabIndex = 0; this.toolStrip1.TabIndex = 0;
this.toolStrip1.TabStop = true; this.toolStrip1.TabStop = true;
// //
@ -129,12 +131,12 @@
// //
// TAStudioButton // TAStudioButton
// //
this.TAStudioButton.Image = global::BizHawk.MultiClient.Properties.Resources.TAStudio; this.TAStudioButton.Image = global::BizHawk.MultiClient.Properties.Resources.GameController;
this.TAStudioButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.TAStudioButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.TAStudioButton.Name = "TAStudioButton"; this.TAStudioButton.Name = "TAStudioButton";
this.TAStudioButton.Size = new System.Drawing.Size(76, 20); this.TAStudioButton.Size = new System.Drawing.Size(86, 20);
this.TAStudioButton.Text = "TAStudio"; this.TAStudioButton.Text = "VirtualPads";
this.TAStudioButton.Click += new System.EventHandler(this.TAStudioButton_Click); this.TAStudioButton.Click += new System.EventHandler(this.TAStudioButton_Click_1);
// //
// NESDebugger // NESDebugger
// //
@ -195,11 +197,20 @@
this.SNESGraphicsDebuggerButton.Text = "Gfx Debugger"; this.SNESGraphicsDebuggerButton.Text = "Gfx Debugger";
this.SNESGraphicsDebuggerButton.Click += new System.EventHandler(this.SNESGraphicsDebuggerButton_Click); this.SNESGraphicsDebuggerButton.Click += new System.EventHandler(this.SNESGraphicsDebuggerButton_Click);
// //
// toolStripButton6
//
this.toolStripButton6.Image = global::BizHawk.MultiClient.Properties.Resources.TAStudio;
this.toolStripButton6.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton6.Name = "toolStripButton6";
this.toolStripButton6.Size = new System.Drawing.Size(76, 20);
this.toolStripButton6.Text = "TAStudio";
this.toolStripButton6.Click += new System.EventHandler(this.TAStudioButton_Click);
//
// ToolBox // ToolBox
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(116, 321); this.ClientSize = new System.Drawing.Size(116, 338);
this.Controls.Add(this.toolStrip1); this.Controls.Add(this.toolStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MinimumSize = new System.Drawing.Size(130, 64); this.MinimumSize = new System.Drawing.Size(130, 64);
@ -230,6 +241,7 @@
private System.Windows.Forms.ToolStripButton TAStudioButton; private System.Windows.Forms.ToolStripButton TAStudioButton;
private System.Windows.Forms.ToolStripButton GameboyDebuggerTool; private System.Windows.Forms.ToolStripButton GameboyDebuggerTool;
private System.Windows.Forms.ToolStripButton SNESGraphicsDebuggerButton; private System.Windows.Forms.ToolStripButton SNESGraphicsDebuggerButton;
private System.Windows.Forms.ToolStripButton toolStripButton6;
} }
} }

View File

@ -66,6 +66,8 @@ namespace BizHawk.MultiClient
{ {
SNESGraphicsDebuggerButton.Visible = false; SNESGraphicsDebuggerButton.Visible = false;
} }
Size = new Size(this.Size.Width, toolStrip1.Size.Height + 50);
} }
private void toolStripButton1_Click(object sender, EventArgs e) private void toolStripButton1_Click(object sender, EventArgs e)
@ -139,5 +141,10 @@ namespace BizHawk.MultiClient
Global.MainForm.LoadSNESGraphicsDebugger(); Global.MainForm.LoadSNESGraphicsDebugger();
} }
} }
private void TAStudioButton_Click_1(object sender, EventArgs e)
{
Global.MainForm.LoadVirtualPads();
}
} }
} }

View File

@ -143,8 +143,7 @@
this.Controls.Add(this.menuStrip1); this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1; this.MainMenuStrip = this.menuStrip1;
this.MaximumSize = new System.Drawing.Size(404, 350); this.MinimumSize = new System.Drawing.Size(100, 100);
this.MinimumSize = new System.Drawing.Size(404, 350);
this.Name = "VirtualPadForm"; this.Name = "VirtualPadForm";
this.Text = "Virtual Pads"; this.Text = "Virtual Pads";
this.Load += new System.EventHandler(this.VirtualPadForm_Load); this.Load += new System.EventHandler(this.VirtualPadForm_Load);

View File

@ -192,8 +192,8 @@ namespace BizHawk.MultiClient
{ {
foreach (var controller in ControllerBox.Controls) foreach (var controller in ControllerBox.Controls)
{ {
if (controller is VirtualPad) if (controller is IVirtualPad)
((VirtualPad)controller).Clear(); ((IVirtualPad)controller).Clear();
} }
} }