2013-10-25 00:59:34 +00:00
|
|
|
|
namespace BizHawk.Client.Common
|
|
|
|
|
{
|
|
|
|
|
public class MultitrackRecording
|
|
|
|
|
{
|
2014-08-03 20:34:45 +00:00
|
|
|
|
public void Restart()
|
|
|
|
|
{
|
|
|
|
|
IsActive = false;
|
|
|
|
|
CurrentPlayer = 0;
|
|
|
|
|
RecordAll = false;
|
|
|
|
|
}
|
|
|
|
|
|
2013-10-28 01:06:51 +00:00
|
|
|
|
public bool IsActive { get; set; }
|
2014-06-29 23:13:44 +00:00
|
|
|
|
|
2014-08-03 20:34:45 +00:00
|
|
|
|
public int CurrentPlayer{ get; set; }
|
2014-06-29 23:13:44 +00:00
|
|
|
|
|
2013-10-28 01:06:51 +00:00
|
|
|
|
public bool RecordAll { get; set; }
|
2014-06-29 23:13:44 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A user friendly multitrack status
|
|
|
|
|
/// </summary>
|
2014-08-03 20:34:45 +00:00
|
|
|
|
public string CurrentState
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (!IsActive)
|
|
|
|
|
{
|
|
|
|
|
return string.Empty;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (RecordAll)
|
|
|
|
|
{
|
|
|
|
|
return "Recording All";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CurrentPlayer == 0)
|
|
|
|
|
{
|
|
|
|
|
return "Recording None";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return "Recording Player " + CurrentPlayer;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-06-29 23:13:44 +00:00
|
|
|
|
|
|
|
|
|
public void SelectAll()
|
|
|
|
|
{
|
|
|
|
|
CurrentPlayer = 0;
|
|
|
|
|
RecordAll = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SelectNone()
|
|
|
|
|
{
|
|
|
|
|
RecordAll = false;
|
|
|
|
|
CurrentPlayer = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Increment()
|
|
|
|
|
{
|
|
|
|
|
RecordAll = false;
|
|
|
|
|
CurrentPlayer++;
|
|
|
|
|
if (CurrentPlayer > Global.Emulator.ControllerDefinition.PlayerCount)
|
|
|
|
|
{
|
|
|
|
|
CurrentPlayer = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Decrement()
|
|
|
|
|
{
|
|
|
|
|
RecordAll = false;
|
|
|
|
|
CurrentPlayer--;
|
|
|
|
|
if (CurrentPlayer < 1)
|
|
|
|
|
{
|
|
|
|
|
CurrentPlayer = Global.Emulator.ControllerDefinition.PlayerCount;
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-10-25 00:59:34 +00:00
|
|
|
|
}
|
|
|
|
|
}
|