TAStudio - restore copy functionality including generating an input log and putting it on the clipboard
This commit is contained in:
parent
2072eac45f
commit
1ef25132a1
|
@ -7,6 +7,7 @@ using System.Windows.Forms;
|
|||
|
||||
using BizHawk.Client.Common;
|
||||
using BizHawk.Client.Common.MovieConversionExtensions;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
|
@ -375,12 +376,18 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
_tasClipboard.Clear();
|
||||
var list = TasView.SelectedIndices;
|
||||
var sb = new StringBuilder();
|
||||
for (var i = 0; i < list.Count; i++)
|
||||
{
|
||||
//Serialize TODO
|
||||
//_tasClipboard.Add(new TasClipboardEntry(list[i], _tas[i].Buttons));
|
||||
var input = _tas.GetInputState(i);
|
||||
_tasClipboard.Add(new TasClipboardEntry(i, input));
|
||||
var lg = _tas.LogGeneratorInstance();
|
||||
lg.SetSource(input);
|
||||
sb.AppendLine(lg.GenerateLogEntry());
|
||||
}
|
||||
|
||||
Clipboard.SetDataObject(sb.ToString());
|
||||
|
||||
SetSplicer();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue