TAStudio - create a TasMovie object on load, start implementing some tasmovie things, if there is a move active, warn them that they will lose their work when they open tastudio. Swap global movie back to a regular movie on tastudio close
This commit is contained in:
parent
1390b1a7e3
commit
3f79bbfd56
|
@ -8,6 +8,22 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
public class TasMovie : IMovie
|
||||
{
|
||||
public TasMovie(string filename, bool startsFromSavestate = false)
|
||||
: this(startsFromSavestate)
|
||||
{
|
||||
Filename = filename;
|
||||
}
|
||||
|
||||
public TasMovie(bool startsFromSavestate = false)
|
||||
{
|
||||
Filename = String.Empty;
|
||||
Header = new MovieHeader();
|
||||
Header.StartsFromSavestate = startsFromSavestate;
|
||||
}
|
||||
|
||||
public string Filename { get; set; }
|
||||
|
||||
public IMovieHeader Header { get; private set; }
|
||||
|
||||
public bool IsCountingRerecords
|
||||
{
|
||||
|
@ -73,23 +89,6 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
public IMovieHeader Header
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public string Filename
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool Load()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
|
|
@ -27,13 +27,16 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (AskSave())
|
||||
{
|
||||
SaveConfigSettings();
|
||||
GlobalWin.OSD.AddMessage("TAStudio Disengaged");
|
||||
if (Global.MovieSession.Movie is TasMovie)
|
||||
{
|
||||
Global.MovieSession.Movie = new Movie();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Cancel = true;
|
||||
}
|
||||
|
||||
GlobalWin.OSD.AddMessage("TAStudio Disengaged");
|
||||
};
|
||||
|
||||
TopMost = Global.Config.TAStudioTopMost;
|
||||
|
@ -74,7 +77,18 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void TAStudio_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
{
|
||||
var result = MessageBox.Show("Warning, Tastudio doesn't support .bkm movie files at this time, opening this will cause you to lose your work, proceed? If you have unsaved changes you should cancel this, and savebefore opening TAStudio", "Unsupported movie", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
|
||||
if (result != DialogResult.Yes)
|
||||
{
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
GlobalWin.OSD.AddMessage("TAStudio engaged");
|
||||
Global.MovieSession.Movie = new TasMovie();
|
||||
LoadConfigSettings();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue