Some stuff

This commit is contained in:
adelikat 2013-12-06 18:27:06 +00:00
parent 98f1e02df3
commit 38d6555763
3 changed files with 24 additions and 1 deletions

View File

@ -190,6 +190,14 @@ namespace BizHawk.Client.Common
private IController Source;
private string ControlType;
public bool this[int player, string mnemonic]
{
get
{
return IsBasePressed("P" + player + " " + mnemonic); //TODO: not every controller uses "P"
}
}
public void SetSource(IController source)
{
Source = source;

View File

@ -10,7 +10,13 @@ namespace BizHawk.Client.Common
private MnemonicsGenerator _mg;
private byte[] _state;
public string Input { get; private set; }
public string Input
{
get
{
return _mg.GetControllersAsMnemonic();
}
}
public bool Lagged { get; private set; }
public IEnumerable<byte> State
@ -18,6 +24,11 @@ namespace BizHawk.Client.Common
get { return _state; }
}
public bool IsPressed(int player, string mnemonic)
{
return _mg[player, mnemonic];
}
public void SetInput(MnemonicsGenerator mg)
{
_mg = mg;

View File

@ -105,6 +105,10 @@ namespace BizHawk.Client.EmuHawk
{
text = index.ToString().PadLeft(5, '0');
}
else
{
text = _tas[index].IsPressed(1, columnName) ? columnName : String.Empty;
}
}
private void TAStudio_Load(object sender, EventArgs e)