TAStudio - some progress on dynamically displaying columns, and some fixups in movie code in general
This commit is contained in:
parent
a02888344b
commit
46d6279f1b
|
@ -2,6 +2,7 @@
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using BizHawk.Emulation.Common;
|
using BizHawk.Emulation.Common;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace BizHawk.Client.Common
|
namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
|
@ -87,6 +88,20 @@ namespace BizHawk.Client.Common
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Dictionary<string, string> Map()
|
||||||
|
{
|
||||||
|
var dict = new Dictionary<string, string>();
|
||||||
|
foreach (var group in _source.Type.ControlsOrdered.Where(c => c.Any()))
|
||||||
|
{
|
||||||
|
foreach (var button in group)
|
||||||
|
{
|
||||||
|
dict.Add(button, Mnemonics[button].ToString()); // TODO: floats should be a float lookup that returns a string, floats by convention should always be more than one character to distinguish from boolean input
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return dict;
|
||||||
|
}
|
||||||
|
|
||||||
private string CreateLogEntry(bool createEmpty = false)
|
private string CreateLogEntry(bool createEmpty = false)
|
||||||
{
|
{
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
|
|
|
@ -12,15 +12,15 @@ namespace BizHawk.Client.Common
|
||||||
public Bk2Movie(string filename)
|
public Bk2Movie(string filename)
|
||||||
: this()
|
: this()
|
||||||
{
|
{
|
||||||
Subtitles = new SubtitleList();
|
|
||||||
Comments = new List<string>();
|
|
||||||
|
|
||||||
Rerecords = 0;
|
Rerecords = 0;
|
||||||
Filename = filename;
|
Filename = filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Bk2Movie()
|
public Bk2Movie()
|
||||||
{
|
{
|
||||||
|
Subtitles = new SubtitleList();
|
||||||
|
Comments = new List<string>();
|
||||||
|
|
||||||
Filename = string.Empty;
|
Filename = string.Empty;
|
||||||
IsCountingRerecords = true;
|
IsCountingRerecords = true;
|
||||||
_mode = Moviemode.Inactive;
|
_mode = Moviemode.Inactive;
|
||||||
|
|
|
@ -46,18 +46,5 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dictionary<string, string> ColumnNames
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return new Dictionary<string, string>
|
|
||||||
{
|
|
||||||
{ "A", "A" },
|
|
||||||
{ "B", "B" }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,22 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private bool _startMarkerDrag;
|
private bool _startMarkerDrag;
|
||||||
private bool _startFrameDrag;
|
private bool _startFrameDrag;
|
||||||
|
|
||||||
|
private Dictionary<string, string> _map = null;
|
||||||
|
private Dictionary<string, string> ColumnNames
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_map == null)
|
||||||
|
{
|
||||||
|
var lg = new Bk2LogEntryGenerator(string.Empty);
|
||||||
|
lg.SetSource(Global.MovieSession.MovieControllerAdapter);
|
||||||
|
_map = lg.Map();
|
||||||
|
}
|
||||||
|
|
||||||
|
return _map;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region API
|
#region API
|
||||||
|
|
||||||
public TAStudio()
|
public TAStudio()
|
||||||
|
@ -195,7 +211,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
EngageTasStudio();
|
EngageTasStudio();
|
||||||
}
|
}
|
||||||
|
|
||||||
//SetUpColumns();
|
SetUpColumns();
|
||||||
//LoadConfigSettings();
|
//LoadConfigSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,10 +239,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private void SetUpColumns()
|
private void SetUpColumns()
|
||||||
{
|
{
|
||||||
TasView.Columns.Clear();
|
TasView.Columns.Clear();
|
||||||
AddColumn(MarkerColumnName, String.Empty, 18);
|
AddColumn(MarkerColumnName, string.Empty, 18);
|
||||||
AddColumn(FrameColumnName, "Frame#", 68);
|
AddColumn(FrameColumnName, "Frame#", 68);
|
||||||
|
|
||||||
foreach (var kvp in _tas.ColumnNames)
|
foreach (var kvp in ColumnNames)
|
||||||
{
|
{
|
||||||
AddColumn(kvp.Key, kvp.Value, 20);
|
AddColumn(kvp.Key, kvp.Value, 20);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue