Ram Search - Implement preview mode toggle option, and hook up DoPreview() to UpdateValues() (if auto-search is not on)
This commit is contained in:
parent
d0b99ce07a
commit
69f3197277
|
@ -64,6 +64,7 @@
|
||||||
public int RamSearchWidth = -1; //Negative numbers will be ignored
|
public int RamSearchWidth = -1; //Negative numbers will be ignored
|
||||||
public int RamSearchHeight = -1;
|
public int RamSearchHeight = -1;
|
||||||
public int RamSearchPreviousAs = 0;
|
public int RamSearchPreviousAs = 0;
|
||||||
|
public bool RamSearchPreviewMode = true;
|
||||||
|
|
||||||
//Movie Settings
|
//Movie Settings
|
||||||
public RecentFiles RecentMovies = new RecentFiles(8);
|
public RecentFiles RecentMovies = new RecentFiles(8);
|
||||||
|
|
|
@ -72,6 +72,7 @@
|
||||||
this.sinceLastSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.sinceLastSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.sinceLastChangeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.sinceLastChangeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.sinceLastFrameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.sinceLastFrameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.previewModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
|
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
|
||||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||||
this.NewSearchtoolStripButton = new System.Windows.Forms.ToolStripButton();
|
this.NewSearchtoolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||||
|
@ -439,9 +440,10 @@
|
||||||
// optionsToolStripMenuItem
|
// optionsToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.definePreviousValueToolStripMenuItem,
|
||||||
this.restoreOriginalWindowSizeToolStripMenuItem,
|
this.restoreOriginalWindowSizeToolStripMenuItem,
|
||||||
this.saveWindowPositionToolStripMenuItem,
|
this.saveWindowPositionToolStripMenuItem,
|
||||||
this.definePreviousValueToolStripMenuItem});
|
this.previewModeToolStripMenuItem});
|
||||||
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
|
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
|
||||||
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(56, 20);
|
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(56, 20);
|
||||||
this.optionsToolStripMenuItem.Text = "&Options";
|
this.optionsToolStripMenuItem.Text = "&Options";
|
||||||
|
@ -492,6 +494,13 @@
|
||||||
this.sinceLastFrameToolStripMenuItem.Text = "Since last Frame";
|
this.sinceLastFrameToolStripMenuItem.Text = "Since last Frame";
|
||||||
this.sinceLastFrameToolStripMenuItem.Click += new System.EventHandler(this.sinceLastFrameToolStripMenuItem_Click);
|
this.sinceLastFrameToolStripMenuItem.Click += new System.EventHandler(this.sinceLastFrameToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
// previewModeToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.previewModeToolStripMenuItem.Name = "previewModeToolStripMenuItem";
|
||||||
|
this.previewModeToolStripMenuItem.Size = new System.Drawing.Size(204, 22);
|
||||||
|
this.previewModeToolStripMenuItem.Text = "Preview Mode";
|
||||||
|
this.previewModeToolStripMenuItem.Click += new System.EventHandler(this.previewModeToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// toolStripContainer1
|
// toolStripContainer1
|
||||||
//
|
//
|
||||||
this.toolStripContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.toolStripContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
@ -1063,5 +1072,6 @@
|
||||||
private System.Windows.Forms.ToolStripMenuItem sinceLastSearchToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem sinceLastSearchToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem sinceLastChangeToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem sinceLastChangeToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem sinceLastFrameToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem sinceLastFrameToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem previewModeToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -18,9 +18,6 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
//TODO:
|
//TODO:
|
||||||
//Window position gets saved but doesn't load properly
|
//Window position gets saved but doesn't load properly
|
||||||
//Implement Preview search each frame (perhaps if autosearch is not on?)
|
|
||||||
//Refactor preview search to use prevList
|
|
||||||
//Add Preview toggle to options menu
|
|
||||||
//Implement definitions of Previous value
|
//Implement definitions of Previous value
|
||||||
//Multiple memory domains
|
//Multiple memory domains
|
||||||
//Option to remove current Ram Watch list from search list
|
//Option to remove current Ram Watch list from search list
|
||||||
|
@ -62,6 +59,8 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
if (AutoSearchCheckBox.Checked)
|
if (AutoSearchCheckBox.Checked)
|
||||||
DoSearch();
|
DoSearch();
|
||||||
|
else if (Global.Config.RamSearchPreviewMode)
|
||||||
|
DoPreview();
|
||||||
SearchListView.Refresh();
|
SearchListView.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -514,16 +513,20 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
private void DoPreview()
|
private void DoPreview()
|
||||||
{
|
{
|
||||||
weededList.Clear(); //TODO: use previewList to avoid having to clear this!
|
if (Global.Config.RamSearchPreviewMode)
|
||||||
|
{
|
||||||
|
weededList.Clear();
|
||||||
if (GenerateWeedOutList())
|
if (GenerateWeedOutList())
|
||||||
{
|
{
|
||||||
DisplaySearchList();
|
DisplaySearchList();
|
||||||
OutputLabel.Text = MakeAddressString(weededList.Count) + "would be removed";
|
OutputLabel.Text = MakeAddressString(weededList.Count) + "would be removed";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void DoSearch()
|
private void DoSearch()
|
||||||
{
|
{
|
||||||
|
//TODO: if already previewed, don't generate the list again, perhaps a bool?
|
||||||
if (GenerateWeedOutList())
|
if (GenerateWeedOutList())
|
||||||
{
|
{
|
||||||
SaveUndo();
|
SaveUndo();
|
||||||
|
@ -1264,6 +1267,7 @@ namespace BizHawk.MultiClient
|
||||||
private void optionsToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
|
private void optionsToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
saveWindowPositionToolStripMenuItem.Checked = Global.Config.RamSearchSaveWindowPosition;
|
saveWindowPositionToolStripMenuItem.Checked = Global.Config.RamSearchSaveWindowPosition;
|
||||||
|
previewModeToolStripMenuItem.Checked = Global.Config.RamSearchPreviewMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void searchToolStripMenuItem1_Click(object sender, EventArgs e)
|
private void searchToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||||
|
@ -1376,6 +1380,11 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
if (!DifferentByRadio.Checked) DoPreview();
|
if (!DifferentByRadio.Checked) DoPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void previewModeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Global.Config.RamSearchPreviewMode ^= true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue