Ram Watch - change counts column

This commit is contained in:
andres.delikat 2011-02-24 04:56:24 +00:00
parent 023fb0897a
commit de3a14ae07
2 changed files with 22 additions and 4 deletions

View File

@ -59,6 +59,7 @@
this.WatchListView = new BizHawk.VirtualListView();
this.Address = new System.Windows.Forms.ColumnHeader();
this.Value = new System.Windows.Forms.ColumnHeader();
this.ChangeCounts = new System.Windows.Forms.ColumnHeader();
this.Notes = new System.Windows.Forms.ColumnHeader();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -314,6 +315,7 @@
this.WatchListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.Address,
this.Value,
this.ChangeCounts,
this.Notes});
this.WatchListView.ContextMenuStrip = this.contextMenuStrip1;
this.WatchListView.FullRowSelect = true;
@ -338,6 +340,13 @@
//
this.Value.Text = "Value";
this.Value.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.Value.Width = 59;
//
// ChangeCounts
//
this.ChangeCounts.Text = "Changes";
this.ChangeCounts.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.ChangeCounts.Width = 54;
//
// Notes
//
@ -633,6 +642,7 @@
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ColumnHeader Address;
private System.Windows.Forms.ColumnHeader Value;
private System.Windows.Forms.ColumnHeader ChangeCounts;
private System.Windows.Forms.ColumnHeader Notes;
private System.Windows.Forms.Label WatchCountLabel;
private System.Windows.Forms.ToolStripMenuItem noneToolStripMenuItem;

View File

@ -19,11 +19,10 @@ namespace BizHawk.MultiClient
//TODO:
//On Movie UP/Down set highlighted items to be what the user had selected (in their new position)
//DisplayWatches needs to do value display properly like updatevalues, or just run update values
//When Watch object has a changes member, display in watch list with a reset changes function
//Ability to watch in different memory domains
//Ability to watch in different memory domains
//Reset Changecounts function
//Option to high change counts?
//IDEAS:
//OPtion to show a change count column
//Option to show previous value
//Option to show change from previous value
@ -50,7 +49,12 @@ namespace BizHawk.MultiClient
public void UpdateValues()
{
for (int x = 0; x < watchList.Count; x++)
{
watchList[x].prev = watchList[x].value;
watchList[x].PeekAddress(Global.Emulator.MainMemory);
if (watchList[x].value != watchList[x].prev)
watchList[x].changecount++;
}
WatchListView.Refresh();
}
@ -123,6 +127,10 @@ namespace BizHawk.MultiClient
}
}
if (column == 2)
{
text = watchList[index].changecount.ToString();
}
if (column == 3)
{
if (watchList[index].type == atype.SEPARATOR)
text = "";