Add read-only checkbox to Play Movie dialog. Record movie dialog sets the emulator to read+write.

This commit is contained in:
andres.delikat 2011-05-17 00:27:22 +00:00
parent b9ec7e626e
commit 311af36737
4 changed files with 25 additions and 11 deletions

View File

@ -1831,7 +1831,10 @@ namespace BizHawk.MultiClient
LoadRom(Global.MainForm.CurrentlyOpenRom);
UserMovie.LoadMovie();
if (record)
{
UserMovie.StartNewRecording();
ReadOnly = false;
}
else
UserMovie.StartPlayback();
}

View File

@ -44,6 +44,7 @@
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.MovieCount = new System.Windows.Forms.Label();
this.ReadOnlyCheckBox = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
@ -189,6 +190,18 @@
this.MovieCount.TabIndex = 7;
this.MovieCount.Text = " ";
//
// ReadOnlyCheckBox
//
this.ReadOnlyCheckBox.AutoSize = true;
this.ReadOnlyCheckBox.Checked = true;
this.ReadOnlyCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.ReadOnlyCheckBox.Location = new System.Drawing.Point(131, 370);
this.ReadOnlyCheckBox.Name = "ReadOnlyCheckBox";
this.ReadOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
this.ReadOnlyCheckBox.TabIndex = 8;
this.ReadOnlyCheckBox.Text = "Read only";
this.ReadOnlyCheckBox.UseVisualStyleBackColor = true;
//
// PlayMovie
//
this.AcceptButton = this.OK;
@ -196,6 +209,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.Cancel;
this.ClientSize = new System.Drawing.Size(715, 401);
this.Controls.Add(this.ReadOnlyCheckBox);
this.Controls.Add(this.MovieCount);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.MovieView);
@ -231,5 +245,6 @@
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label MovieCount;
private System.Windows.Forms.CheckBox ReadOnlyCheckBox;
}
}

View File

@ -12,14 +12,11 @@ namespace BizHawk.MultiClient
{
public partial class PlayMovie : Form
{
//TODO: Think about this: .\Movies is the default folder, when shoudl this be created? On load (no platform specific folders do this)
//Upon open file dialog? that's weird, record movie? more often people will use play movie first
//Never? then the path default must be .\ not .\movies
//TODO: after browse & update, focus on the movie just added
//TODO: after browse & update, focus on the movie just added, and show stats
//This is a modal dialog, implement it as modeless
// In order to do this, this dialog will have to restart the rom
// Option to include subdirectories
// Option to include savestate files (that have an input log)
List<Movie> MovieList = new List<Movie>();
@ -61,6 +58,7 @@ namespace BizHawk.MultiClient
private void OK_Click(object sender, EventArgs e)
{
Global.MainForm.ReadOnly = ReadOnlyCheckBox.Checked;
Run();
this.Close();
}

View File

@ -339,17 +339,15 @@ namespace BizHawk.MultiClient
//TODO: remove rerecord count code and make it its own display option
if (Global.MainForm.UserMovie.GetMovieMode() == MOVIEMODE.FINISHED)
{
return Global.Emulator.Frame.ToString() + " " + Global.Emulator.Frame.ToString()
+ "/" + Global.MainForm.UserMovie.GetMovieLength().ToString() + " (Finished)";
return Global.Emulator.Frame.ToString() + "/" + Global.MainForm.UserMovie.GetMovieLength().ToString() + " (Finished)";
}
else if (Global.MainForm.UserMovie.GetMovieMode() == MOVIEMODE.PLAY)
{
return Global.Emulator.Frame.ToString() + " " + Global.MainForm.UserMovie.lastLog.ToString()
return "E" + Global.Emulator.Frame.ToString() + " " + Global.MainForm.UserMovie.lastLog.ToString()
+ "/" + Global.MainForm.UserMovie.GetMovieLength().ToString();
}
else if (Global.MainForm.UserMovie.GetMovieMode() != MOVIEMODE.INACTIVE)
return Global.Emulator.Frame.ToString() + " " + Global.MainForm.UserMovie.lastLog.ToString()
+ "/" + Global.MainForm.UserMovie.GetMovieLength().ToString();
else if (Global.MainForm.UserMovie.GetMovieMode() == MOVIEMODE.RECORD)
return "E" + Global.Emulator.Frame.ToString() + " " + Global.MainForm.UserMovie.lastLog.ToString();
else
{
return Global.Emulator.Frame.ToString();