diff --git a/BizHawk.MultiClient/BizHawk.MultiClient.csproj b/BizHawk.MultiClient/BizHawk.MultiClient.csproj index 8b5a03d965..e0571c5a39 100644 --- a/BizHawk.MultiClient/BizHawk.MultiClient.csproj +++ b/BizHawk.MultiClient/BizHawk.MultiClient.csproj @@ -285,6 +285,12 @@ + + Form + + + ToolBox.cs + @@ -379,6 +385,10 @@ RamSearch.cs Designer + + ToolBox.cs + Designer + diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index 6e12aeb991..5a59cbab19 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -183,6 +183,7 @@ public string LoadSlot7 = "F7"; public string LoadSlot8 = "F8"; public string LoadSlot9 = "F9"; + public string ToolBox = "T"; // SMS / GameGear Settings diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 72caa1f39d..61b872bfac 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -51,6 +51,7 @@ namespace BizHawk.MultiClient public NESPPU NESPPU1 = new NESPPU(); public NESDebugger NESDebug1 = new NESDebugger(); public Cheats Cheats1 = new Cheats(); + public ToolBox ToolBox1 = new ToolBox(); public MainForm(string[] args) { @@ -259,7 +260,7 @@ namespace BizHawk.MultiClient "Emulator Pause", "Frame Advance", "Screenshot", "Toggle Fullscreen", "SelectSlot0", "SelectSlot1", "SelectSlot2", "SelectSlot3", "SelectSlot4", "SelectSlot5", "SelectSlot6", "SelectSlot7", "SelectSlot8", "SelectSlot9", "SaveSlot0", "SaveSlot1", "SaveSlot2", "SaveSlot3", "SaveSlot4", "SaveSlot5","SaveSlot6","SaveSlot7","SaveSlot8","SaveSlot9","LoadSlot0","LoadSlot1","LoadSlot2","LoadSlot3","LoadSlot4","LoadSlot5","LoadSlot6", - "LoadSlot7","LoadSlot8","LoadSlot9"} + "LoadSlot7","LoadSlot8","LoadSlot9", "ToolBox"} }; private void InitControls() @@ -305,6 +306,7 @@ namespace BizHawk.MultiClient controls.BindMulti("LoadSlot7", Global.Config.LoadSlot7); controls.BindMulti("LoadSlot8", Global.Config.LoadSlot8); controls.BindMulti("LoadSlot9", Global.Config.LoadSlot9); + controls.BindMulti("ToolBox", Global.Config.ToolBox); Global.ClientControls = controls; var smsControls = new Controller(SMS.SmsController); @@ -632,7 +634,13 @@ namespace BizHawk.MultiClient public void CheckHotkeys() { - if (Global.ClientControls["Quick Save State"]) + if (Global.ClientControls["ToolBox"]) + { + LoadToolBox(); + Global.ClientControls.UnpressButton("ToolBox"); + } + + if (Global.ClientControls["Quick Save State"]) { if (!IsNullEmulator()) SaveState("QuickSave" + SaveSlot.ToString()); @@ -1095,6 +1103,17 @@ namespace BizHawk.MultiClient HexEditor1.Focus(); } + public void LoadToolBox() + { + if (!ToolBox1.IsHandleCreated || ToolBox1.IsDisposed) + { + ToolBox1 = new ToolBox(); + ToolBox1.Show(); + } + else + ToolBox1.Close(); + } + public void LoadNESPPU() { if (!NESPPU1.IsHandleCreated || NESPPU1.IsDisposed) diff --git a/BizHawk.MultiClient/tools/ToolBox.Designer.cs b/BizHawk.MultiClient/tools/ToolBox.Designer.cs index 2bcfc5e79d..e6013da510 100644 --- a/BizHawk.MultiClient/tools/ToolBox.Designer.cs +++ b/BizHawk.MultiClient/tools/ToolBox.Designer.cs @@ -1,4 +1,4 @@ -namespace BizHawk.MultiClient.tools +namespace BizHawk.MultiClient { partial class ToolBox { @@ -29,20 +29,88 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ToolBox)); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton3 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton4 = new System.Windows.Forms.ToolStripButton(); + this.toolStrip1.SuspendLayout(); this.SuspendLayout(); // + // toolStrip1 + // + this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripButton1, + this.toolStripButton2, + this.toolStripButton3, + this.toolStripButton4}); + this.toolStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table; + this.toolStrip1.Location = new System.Drawing.Point(9, 27); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(85, 111); + this.toolStrip1.TabIndex = 0; + // + // toolStripButton1 + // + this.toolStripButton1.Image = global::BizHawk.MultiClient.Properties.Resources.cheat; + this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton1.Name = "toolStripButton1"; + this.toolStripButton1.Size = new System.Drawing.Size(74, 20); + this.toolStripButton1.Text = "Debugger"; + this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click); + // + // toolStripButton2 + // + this.toolStripButton2.Image = global::BizHawk.MultiClient.Properties.Resources.FindHS; + this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton2.Name = "toolStripButton2"; + this.toolStripButton2.Size = new System.Drawing.Size(82, 20); + this.toolStripButton2.Text = "Ram Watch"; + this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click); + // + // toolStripButton3 + // + this.toolStripButton3.Image = global::BizHawk.MultiClient.Properties.Resources.search; + this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton3.Name = "toolStripButton3"; + this.toolStripButton3.Size = new System.Drawing.Size(84, 20); + this.toolStripButton3.Text = "Ram Search"; + this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click); + // + // toolStripButton4 + // + this.toolStripButton4.Image = global::BizHawk.MultiClient.Properties.Resources.poke; + this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton4.Name = "toolStripButton4"; + this.toolStripButton4.Size = new System.Drawing.Size(74, 20); + this.toolStripButton4.Text = "Ram Poke"; + this.toolStripButton4.Click += new System.EventHandler(this.toolStripButton4_Click); + // // ToolBox // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(292, 273); + this.ClientSize = new System.Drawing.Size(123, 297); + this.Controls.Add(this.toolStrip1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "ToolBox"; this.Text = "Tool Box"; + this.Load += new System.EventHandler(this.ToolBox_Load); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion + + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripButton toolStripButton1; + private System.Windows.Forms.ToolStripButton toolStripButton2; + private System.Windows.Forms.ToolStripButton toolStripButton3; + private System.Windows.Forms.ToolStripButton toolStripButton4; + } } \ No newline at end of file diff --git a/BizHawk.MultiClient/tools/ToolBox.cs b/BizHawk.MultiClient/tools/ToolBox.cs index 200b6fbca8..4f25e0392b 100644 --- a/BizHawk.MultiClient/tools/ToolBox.cs +++ b/BizHawk.MultiClient/tools/ToolBox.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Text; using System.Windows.Forms; -namespace BizHawk.MultiClient.tools +namespace BizHawk.MultiClient { public partial class ToolBox : Form { @@ -15,5 +15,33 @@ namespace BizHawk.MultiClient.tools { InitializeComponent(); } + + private void ToolBox_Load(object sender, EventArgs e) + { + int x = Global.MainForm.Location.X + Global.MainForm.Size.Width; + int y = Global.MainForm.Location.Y; + Location = new Point(x, y); + } + + private void toolStripButton1_Click(object sender, EventArgs e) + { + Global.MainForm.LoadCheatsWindow(); + } + + private void toolStripButton2_Click(object sender, EventArgs e) + { + Global.MainForm.LoadRamWatch(); + } + + private void toolStripButton3_Click(object sender, EventArgs e) + { + Global.MainForm.LoadRamSearch(); + } + + private void toolStripButton4_Click(object sender, EventArgs e) + { + RamPoke r = new RamPoke(); + r.Show(); + } } } diff --git a/BizHawk.MultiClient/tools/ToolBox.resx b/BizHawk.MultiClient/tools/ToolBox.resx index 9eb9e0e627..0644bcb60d 100644 --- a/BizHawk.MultiClient/tools/ToolBox.resx +++ b/BizHawk.MultiClient/tools/ToolBox.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 +