diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index 768ccc1031..bf962fd27e 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -262,6 +262,7 @@ namespace BizHawk.MultiClient public bool RamWatchShowChangeColumn = true; public bool RamWatchShowPrevColumn = false; public bool RamWatchShowDiffColumn = false; + public bool RamWatchShowDomainColumn = true; public int RamWatchAddressWidth = -1; public int RamWatchValueWidth = -1; public int RamWatchPrevWidth = -1; diff --git a/BizHawk.MultiClient/tools/RamWatch.Designer.cs b/BizHawk.MultiClient/tools/RamWatch.Designer.cs index 9813abe08f..be65dd9764 100644 --- a/BizHawk.MultiClient/tools/RamWatch.Designer.cs +++ b/BizHawk.MultiClient/tools/RamWatch.Designer.cs @@ -107,12 +107,13 @@ this.MoveDownStripButton1 = new System.Windows.Forms.ToolStripButton(); this.WatchListView = new BizHawk.VirtualListView(); this.Address = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.DomainColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.Value = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.Prev = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.ChangeCounts = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.Diff = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.DomainColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.Notes = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.domainToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout(); @@ -380,7 +381,8 @@ this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.showPreviousValueToolStripMenuItem, this.showChangeCountsToolStripMenuItem, - this.diffToolStripMenuItem}); + this.diffToolStripMenuItem, + this.domainToolStripMenuItem}); this.viewToolStripMenuItem.Name = "viewToolStripMenuItem"; this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); this.viewToolStripMenuItem.Text = "&View"; @@ -831,11 +833,6 @@ // this.Address.Text = "Address"; // - // DomainColumn - // - this.DomainColumn.Text = "Domain"; - this.DomainColumn.Width = 55; - // // Value // this.Value.Text = "Value"; @@ -860,11 +857,23 @@ this.Diff.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.Diff.Width = 59; // + // DomainColumn + // + this.DomainColumn.Text = "Domain"; + this.DomainColumn.Width = 55; + // // Notes // this.Notes.Text = "Notes"; this.Notes.Width = 128; // + // domainToolStripMenuItem + // + this.domainToolStripMenuItem.Name = "domainToolStripMenuItem"; + this.domainToolStripMenuItem.Size = new System.Drawing.Size(156, 22); + this.domainToolStripMenuItem.Text = "Domain"; + this.domainToolStripMenuItem.Click += new System.EventHandler(this.domainToolStripMenuItem_Click); + // // RamWatch // this.AllowDrop = true; @@ -983,5 +992,6 @@ private System.Windows.Forms.ToolStripMenuItem previousFrameToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem lastChangeToolStripMenuItem; private System.Windows.Forms.ColumnHeader DomainColumn; + private System.Windows.Forms.ToolStripMenuItem domainToolStripMenuItem; } } \ No newline at end of file diff --git a/BizHawk.MultiClient/tools/RamWatch.cs b/BizHawk.MultiClient/tools/RamWatch.cs index 666fd46b75..27f2466641 100644 --- a/BizHawk.MultiClient/tools/RamWatch.cs +++ b/BizHawk.MultiClient/tools/RamWatch.cs @@ -139,6 +139,7 @@ namespace BizHawk.MultiClient SetPrevColumn(Global.Config.RamWatchShowPrevColumn); SetChangesColumn(Global.Config.RamWatchShowChangeColumn); SetDiffColumn(Global.Config.RamWatchShowDiffColumn); + SetDomainColumn(Global.Config.RamWatchShowDomainColumn); if (Global.Config.RamWatchAddressWidth > 0) { @@ -811,6 +812,7 @@ namespace BizHawk.MultiClient showChangeCountsToolStripMenuItem.Checked = true; Global.Config.RamWatchShowChangeColumn = true; Global.Config.RamWatchShowDiffColumn = false; + Global.Config.RamWatchShowDomainColumn = true; WatchListView.Columns[0].Width = 60; WatchListView.Columns[1].Width = 59; WatchListView.Columns[2].Width = 0; @@ -1109,6 +1111,21 @@ namespace BizHawk.MultiClient } } + + private void SetDomainColumn(bool show) + { + Global.Config.RamWatchShowDomainColumn = show; + domainToolStripMenuItem.Checked = show; + if (show) + { + WatchListView.Columns[Global.Config.RamWatchDomainIndex].Width = 55; + } + else + { + WatchListView.Columns[Global.Config.RamWatchDomainIndex].Width = 0; + } + } + private void SetChangesColumn(bool show) { Global.Config.RamWatchShowChangeColumn = show; @@ -1556,6 +1573,7 @@ namespace BizHawk.MultiClient showPreviousValueToolStripMenuItem.Checked = Global.Config.RamWatchShowPrevColumn; showChangeCountsToolStripMenuItem.Checked = Global.Config.RamWatchShowChangeColumn; diffToolStripMenuItem.Checked = Global.Config.RamWatchShowDiffColumn; + domainToolStripMenuItem.Checked = Global.Config.RamWatchShowDomainColumn; } private void showDifferenceToolStripMenuItem_Click(object sender, EventArgs e) @@ -1595,5 +1613,11 @@ namespace BizHawk.MultiClient break; } } + + private void domainToolStripMenuItem_Click(object sender, EventArgs e) + { + Global.Config.RamWatchShowDomainColumn ^= true; + SetDomainColumn(Global.Config.RamWatchShowDomainColumn); + } } } \ No newline at end of file