TAStudio - Basic input toggling via clicking cells in the listview
This commit is contained in:
parent
a07ef9f011
commit
14184c9ae9
|
@ -32,6 +32,11 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
public void ToggleButton(int frame, string buttonName)
|
||||
{
|
||||
_records[frame].Buttons[buttonName] ^= true;
|
||||
}
|
||||
|
||||
#region Implementation
|
||||
|
||||
public TasMovie(string filename, bool startsFromSavestate = false)
|
||||
|
|
|
@ -8,8 +8,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public class TasListView : VirtualListView
|
||||
{
|
||||
public string PointedColumnName = String.Empty;
|
||||
public int? PointedRowIndex = null;
|
||||
public string PointedColumnName { get; private set; }
|
||||
public int? PointedRowIndex { get; private set; }
|
||||
|
||||
private void CalculatePointedCell(int x, int y)
|
||||
{
|
||||
|
|
|
@ -666,6 +666,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.TASView.TabIndex = 1;
|
||||
this.TASView.UseCompatibleStateImageBehavior = false;
|
||||
this.TASView.View = System.Windows.Forms.View.Details;
|
||||
this.TASView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.TASView_MouseDown);
|
||||
//
|
||||
// Frame
|
||||
//
|
||||
|
|
|
@ -228,6 +228,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
#endregion
|
||||
|
||||
#region TASView Events
|
||||
|
||||
private void TASView_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (TASView.PointedRowIndex.HasValue && !String.IsNullOrEmpty(TASView.PointedColumnName))
|
||||
{
|
||||
_tas.ToggleButton(TASView.PointedRowIndex.Value, TASView.PointedColumnName);
|
||||
TASView.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue