Save a default user setting and allow the user to set this in the record movie dialog

This commit is contained in:
andres.delikat 2011-06-30 01:37:54 +00:00
parent 889d997a32
commit 9a80fb206c
3 changed files with 22 additions and 0 deletions

View File

@ -280,6 +280,8 @@
public RecentFiles RecentMovies = new RecentFiles(8);
public bool AutoLoadMostRecentMovie = false;
public bool BindSavestatesToMovies = true;
public string DefaultAuthor = "default user";
public bool UseDefaultAuthor = true;
//TI83
public bool TI83disableSaveSlotKeys = true;

View File

@ -39,6 +39,7 @@
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.DefaultAuthorCheckBox = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
@ -105,6 +106,7 @@
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.DefaultAuthorCheckBox);
this.groupBox1.Controls.Add(this.AuthorBox);
this.groupBox1.Controls.Add(this.StartFromCombo);
this.groupBox1.Controls.Add(this.Browse);
@ -155,6 +157,16 @@
this.label1.TabIndex = 4;
this.label1.Text = "File:";
//
// DefaultAuthorCheckBox
//
this.DefaultAuthorCheckBox.AutoSize = true;
this.DefaultAuthorCheckBox.Location = new System.Drawing.Point(327, 64);
this.DefaultAuthorCheckBox.Name = "DefaultAuthorCheckBox";
this.DefaultAuthorCheckBox.Size = new System.Drawing.Size(121, 17);
this.DefaultAuthorCheckBox.TabIndex = 6;
this.DefaultAuthorCheckBox.Text = "Make default author";
this.DefaultAuthorCheckBox.UseVisualStyleBackColor = true;
//
// RecordMovie
//
this.AcceptButton = this.OK;
@ -189,5 +201,6 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox AuthorBox;
private System.Windows.Forms.CheckBox DefaultAuthorCheckBox;
}
}

View File

@ -64,6 +64,10 @@ namespace BizHawk.MultiClient
MovieToRecord.SetHeaderLine(MovieHeader.GAMENAME, "NULL");
Global.MainForm.StartNewMovie(MovieToRecord, true);
Global.Config.UseDefaultAuthor = DefaultAuthorCheckBox.Checked;
if (DefaultAuthorCheckBox.Checked)
Global.Config.DefaultAuthor = AuthorBox.Text;
this.Close();
}
else
@ -96,6 +100,9 @@ namespace BizHawk.MultiClient
private void RecordMovie_Load(object sender, EventArgs e)
{
StartFromCombo.SelectedIndex = 0;
DefaultAuthorCheckBox.Checked = Global.Config.UseDefaultAuthor;
if (Global.Config.UseDefaultAuthor)
AuthorBox.Text = Global.Config.DefaultAuthor;
//TODO: populate combo with savestate slots that currently exist
}