From a46101d8168e621f69b449ed8a6c089d96f5dbbe Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Fri, 18 Feb 2011 05:16:21 +0000 Subject: [PATCH] Start Paused menu item --- BizHawk.MultiClient/Config.cs | 1 + BizHawk.MultiClient/MainForm.Designer.cs | 12 +++++++++++- BizHawk.MultiClient/MainForm.cs | 9 +++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index 16a8317040..5fa38b630f 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -9,6 +9,7 @@ public RecentFiles RecentRoms = new RecentFiles(8); public bool PauseWhenMenuActivated = true; public bool SaveWindowPosition = true; + public bool StartPaused = false; public int MainWndx = -1; //Negative numbers will be ignored public int MainWndy = -1; diff --git a/BizHawk.MultiClient/MainForm.Designer.cs b/BizHawk.MultiClient/MainForm.Designer.cs index b3cdaa6036..9fd44d0f19 100644 --- a/BizHawk.MultiClient/MainForm.Designer.cs +++ b/BizHawk.MultiClient/MainForm.Designer.cs @@ -132,6 +132,7 @@ this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.rAMPokeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.startPausedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.SuspendLayout(); // @@ -869,7 +870,8 @@ // this.gUIToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.pauseWhenMenuActivatedToolStripMenuItem, - this.saveWindowPositionToolStripMenuItem}); + this.saveWindowPositionToolStripMenuItem, + this.startPausedToolStripMenuItem}); this.gUIToolStripMenuItem.Name = "gUIToolStripMenuItem"; this.gUIToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.gUIToolStripMenuItem.Text = "GUI"; @@ -969,6 +971,13 @@ this.saveWindowPositionToolStripMenuItem.Text = "Save window position"; this.saveWindowPositionToolStripMenuItem.Click += new System.EventHandler(this.saveWindowPositionToolStripMenuItem_Click); // + // startPausedToolStripMenuItem + // + this.startPausedToolStripMenuItem.Name = "startPausedToolStripMenuItem"; + this.startPausedToolStripMenuItem.Size = new System.Drawing.Size(220, 22); + this.startPausedToolStripMenuItem.Text = "Start paused"; + this.startPausedToolStripMenuItem.Click += new System.EventHandler(this.startPausedToolStripMenuItem_Click); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1094,6 +1103,7 @@ private System.Windows.Forms.ToolStripMenuItem soundToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem rAMPokeToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveWindowPositionToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem startPausedToolStripMenuItem; } } diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index a942c12c70..96278176f9 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -118,6 +118,9 @@ namespace BizHawk.MultiClient if (Global.Config.MainWndx >= 0 && Global.Config.MainWndy >= 0 && Global.Config.SaveWindowPosition) this.Location = new Point(Global.Config.MainWndx, Global.Config.MainWndy); + + if (Global.Config.StartPaused) + PauseEmulator(); } private void PauseEmulator() @@ -1209,6 +1212,7 @@ namespace BizHawk.MultiClient { pauseWhenMenuActivatedToolStripMenuItem.Checked = Global.Config.PauseWhenMenuActivated; saveWindowPositionToolStripMenuItem.Checked = Global.Config.SaveWindowPosition; + startPausedToolStripMenuItem.Checked = Global.Config.StartPaused; } private void pauseWhenMenuActivatedToolStripMenuItem_Click(object sender, EventArgs e) @@ -1237,5 +1241,10 @@ namespace BizHawk.MultiClient { Global.Config.SaveWindowPosition ^= true; } + + private void startPausedToolStripMenuItem_Click(object sender, EventArgs e) + { + Global.Config.StartPaused ^= true; + } } } \ No newline at end of file