Play Movie dialog - Match Game Name option, checked by default.

This commit is contained in:
andres.delikat 2011-12-27 00:15:48 +00:00
parent 37619ba147
commit f1da3bfa08
4 changed files with 80 additions and 57 deletions

View File

@ -344,6 +344,7 @@
//Play Movie Dialog //Play Movie Dialog
public bool PlayMovie_IncludeSubdir = true; public bool PlayMovie_IncludeSubdir = true;
public bool PlayMovie_ShowStateFiles = false; public bool PlayMovie_ShowStateFiles = false;
public bool PlayMovie_MatchGameName = true;
//TI83 //TI83
public bool TI83autoloadKeyPad = true; public bool TI83autoloadKeyPad = true;

View File

@ -50,6 +50,7 @@
this.ShowStateFiles = new System.Windows.Forms.CheckBox(); this.ShowStateFiles = new System.Windows.Forms.CheckBox();
this.Scan = new System.Windows.Forms.Button(); this.Scan = new System.Windows.Forms.Button();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.MatchGameNameCheckBox = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -262,6 +263,17 @@
this.Scan.UseVisualStyleBackColor = true; this.Scan.UseVisualStyleBackColor = true;
this.Scan.Click += new System.EventHandler(this.Scan_Click); this.Scan.Click += new System.EventHandler(this.Scan_Click);
// //
// MatchGameNameCheckBox
//
this.MatchGameNameCheckBox.AutoSize = true;
this.MatchGameNameCheckBox.Location = new System.Drawing.Point(260, 337);
this.MatchGameNameCheckBox.Name = "MatchGameNameCheckBox";
this.MatchGameNameCheckBox.Size = new System.Drawing.Size(150, 17);
this.MatchGameNameCheckBox.TabIndex = 56;
this.MatchGameNameCheckBox.Text = "Match current game name";
this.MatchGameNameCheckBox.UseVisualStyleBackColor = true;
this.MatchGameNameCheckBox.CheckedChanged += new System.EventHandler(this.MatchGameNameCheckBox_CheckedChanged);
//
// PlayMovie // PlayMovie
// //
this.AcceptButton = this.OK; this.AcceptButton = this.OK;
@ -269,6 +281,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.Cancel; this.CancelButton = this.Cancel;
this.ClientSize = new System.Drawing.Size(765, 387); this.ClientSize = new System.Drawing.Size(765, 387);
this.Controls.Add(this.MatchGameNameCheckBox);
this.Controls.Add(this.Scan); this.Controls.Add(this.Scan);
this.Controls.Add(this.ShowStateFiles); this.Controls.Add(this.ShowStateFiles);
this.Controls.Add(this.IncludeSubDirectories); this.Controls.Add(this.IncludeSubDirectories);
@ -314,5 +327,6 @@
private System.Windows.Forms.CheckBox ShowStateFiles; private System.Windows.Forms.CheckBox ShowStateFiles;
private System.Windows.Forms.Button Scan; private System.Windows.Forms.Button Scan;
private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.CheckBox MatchGameNameCheckBox;
} }
} }

View File

@ -167,6 +167,9 @@ namespace BizHawk.MultiClient
m.Header.SetHeaderLine(MovieHeader.PLATFORM, "NES"); m.Header.SetHeaderLine(MovieHeader.PLATFORM, "NES");
else if (path.Extension == ".MC2") else if (path.Extension == ".MC2")
m.Header.SetHeaderLine(MovieHeader.PLATFORM, "PCE"); m.Header.SetHeaderLine(MovieHeader.PLATFORM, "PCE");
if (m.Header.GetHeaderLine(MovieHeader.GAMENAME) == Global.Game.Name ||
Global.Config.PlayMovie_MatchGameName == false)
MovieList.Add(m); MovieList.Add(m);
} }
@ -296,7 +299,7 @@ namespace BizHawk.MultiClient
{ {
IncludeSubDirectories.Checked = Global.Config.PlayMovie_IncludeSubdir; IncludeSubDirectories.Checked = Global.Config.PlayMovie_IncludeSubdir;
ShowStateFiles.Checked = Global.Config.PlayMovie_ShowStateFiles; ShowStateFiles.Checked = Global.Config.PlayMovie_ShowStateFiles;
MatchGameNameCheckBox.Checked = Global.Config.PlayMovie_MatchGameName;
ScanFiles(); ScanFiles();
PreHighlightMovie(); PreHighlightMovie();
} }
@ -407,5 +410,10 @@ namespace BizHawk.MultiClient
PreHighlightMovie(); PreHighlightMovie();
} }
private void MatchGameNameCheckBox_CheckedChanged(object sender, EventArgs e)
{
Global.Config.PlayMovie_MatchGameName = MatchGameNameCheckBox.Checked;
}
} }
} }