Ram Watch - ability to hide/show the address column
This commit is contained in:
parent
2e60803a13
commit
dd5842ec9b
|
@ -195,6 +195,7 @@ namespace BizHawk.Client.Common
|
|||
// RamWatch Settings
|
||||
public ToolDialogSettings RamWatchSettings = new ToolDialogSettings();
|
||||
public RecentFiles RecentWatches = new RecentFiles(8);
|
||||
public bool RamWatchShowAddressColumn = true;
|
||||
public bool RamWatchShowChangeColumn = true;
|
||||
public bool RamWatchShowPrevColumn = false;
|
||||
public bool RamWatchShowDiffColumn = false;
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
this.ShowDiffContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ShowDomainContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1 = new StatusStripEx();
|
||||
this.ErrorIconButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.MessageLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStrip1 = new ToolStripEx();
|
||||
this.newToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
|
@ -118,7 +119,7 @@
|
|||
this.DiffColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.DomainColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.NotesColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.ErrorIconButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.ShowAddressMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ListViewContextMenu.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
|
@ -294,6 +295,7 @@
|
|||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.ClickThrough = true;
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.ErrorIconButton,
|
||||
this.MessageLabel});
|
||||
|
@ -303,6 +305,17 @@
|
|||
this.statusStrip1.TabIndex = 8;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// ErrorIconButton
|
||||
//
|
||||
this.ErrorIconButton.BackColor = System.Drawing.Color.NavajoWhite;
|
||||
this.ErrorIconButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.ErrorIconButton.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.ExclamationRed;
|
||||
this.ErrorIconButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.ErrorIconButton.Name = "ErrorIconButton";
|
||||
this.ErrorIconButton.Size = new System.Drawing.Size(23, 20);
|
||||
this.ErrorIconButton.Text = "Warning! Out of Range Addresses in list, click to remove them";
|
||||
this.ErrorIconButton.Click += new System.EventHandler(this.ErrorIconButton_Click);
|
||||
//
|
||||
// MessageLabel
|
||||
//
|
||||
this.MessageLabel.Name = "MessageLabel";
|
||||
|
@ -815,6 +828,7 @@
|
|||
// ColumnsSubMenu
|
||||
//
|
||||
this.ColumnsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.ShowAddressMenuItem,
|
||||
this.ShowPreviousMenuItem,
|
||||
this.ShowChangesMenuItem,
|
||||
this.ShowDiffMenuItem,
|
||||
|
@ -935,16 +949,12 @@
|
|||
this.NotesColumn.Text = "Notes";
|
||||
this.NotesColumn.Width = 128;
|
||||
//
|
||||
// ErrorIconButton
|
||||
// ShowAddressMenuItem
|
||||
//
|
||||
this.ErrorIconButton.BackColor = System.Drawing.Color.NavajoWhite;
|
||||
this.ErrorIconButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.ErrorIconButton.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.ExclamationRed;
|
||||
this.ErrorIconButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.ErrorIconButton.Name = "ErrorIconButton";
|
||||
this.ErrorIconButton.Size = new System.Drawing.Size(23, 20);
|
||||
this.ErrorIconButton.Text = "Warning! Out of Range Addresses in list, click to remove them";
|
||||
this.ErrorIconButton.Click += new System.EventHandler(this.ErrorIconButton_Click);
|
||||
this.ShowAddressMenuItem.Name = "ShowAddressMenuItem";
|
||||
this.ShowAddressMenuItem.Size = new System.Drawing.Size(156, 22);
|
||||
this.ShowAddressMenuItem.Text = "Address";
|
||||
this.ShowAddressMenuItem.Click += new System.EventHandler(this.ShowAddressMenuItem_Click);
|
||||
//
|
||||
// RamWatch
|
||||
//
|
||||
|
@ -1069,5 +1079,6 @@
|
|||
private StatusStripEx statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel MessageLabel;
|
||||
private System.Windows.Forms.ToolStripButton ErrorIconButton;
|
||||
private System.Windows.Forms.ToolStripMenuItem ShowAddressMenuItem;
|
||||
}
|
||||
}
|
|
@ -362,7 +362,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void LoadColumnInfo()
|
||||
{
|
||||
WatchListView.Columns.Clear();
|
||||
ToolHelpers.AddColumn(WatchListView, WatchList.ADDRESS, true, GetColumnWidth(WatchList.ADDRESS));
|
||||
ToolHelpers.AddColumn(WatchListView, WatchList.ADDRESS, Global.Config.RamWatchShowAddressColumn, GetColumnWidth(WatchList.ADDRESS));
|
||||
ToolHelpers.AddColumn(WatchListView, WatchList.VALUE, true, GetColumnWidth(WatchList.VALUE));
|
||||
ToolHelpers.AddColumn(WatchListView, WatchList.PREV, Global.Config.RamWatchShowPrevColumn, GetColumnWidth(WatchList.PREV));
|
||||
ToolHelpers.AddColumn(WatchListView, WatchList.CHANGES, Global.Config.RamWatchShowChangeColumn, GetColumnWidth(WatchList.CHANGES));
|
||||
|
@ -925,6 +925,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{ "NotesColumn", -1 },
|
||||
};
|
||||
|
||||
Global.Config.RamWatchShowAddressColumn = true;
|
||||
Global.Config.RamWatchShowChangeColumn = true;
|
||||
Global.Config.RamWatchShowDomainColumn = true;
|
||||
Global.Config.RamWatchShowPrevColumn = false;
|
||||
|
@ -946,12 +947,20 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void ColumnsSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
ShowAddressMenuItem.Checked = Global.Config.RamWatchShowAddressColumn;
|
||||
ShowPreviousMenuItem.Checked = Global.Config.RamWatchShowPrevColumn;
|
||||
ShowChangesMenuItem.Checked = Global.Config.RamWatchShowChangeColumn;
|
||||
ShowDiffMenuItem.Checked = Global.Config.RamWatchShowDiffColumn;
|
||||
ShowDomainMenuItem.Checked = Global.Config.RamWatchShowDomainColumn;
|
||||
}
|
||||
|
||||
private void ShowAddressMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.RamWatchShowAddressColumn ^= true;
|
||||
SaveColumnInfo();
|
||||
LoadColumnInfo();
|
||||
}
|
||||
|
||||
private void ShowPreviousMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.RamWatchShowPrevColumn ^= true;
|
||||
|
|
Loading…
Reference in New Issue