Input roll - some tinkering
This commit is contained in:
parent
97b40bc020
commit
1d29c7e281
|
@ -13,7 +13,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
public class InputRoll : Control
|
||||
{
|
||||
private readonly GDIRenderer gdi;
|
||||
private readonly RollColumns _columns = new RollColumns();
|
||||
private readonly RollColumns Columns = new RollColumns();
|
||||
|
||||
public InputRoll()
|
||||
{
|
||||
|
@ -63,18 +63,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
[Category("Behavior")]
|
||||
public bool AllowColumnReorder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Column data
|
||||
/// </summary>
|
||||
[Category("Behavior")]
|
||||
public RollColumns Columns
|
||||
{
|
||||
get
|
||||
{
|
||||
return _columns;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Event Handlers
|
||||
|
@ -116,6 +104,18 @@ namespace BizHawk.Client.EmuHawk
|
|||
return string.Empty; // TODO
|
||||
}
|
||||
|
||||
public void AddColumns(IEnumerable<RollColumn> columns)
|
||||
{
|
||||
Columns.AddRange(columns);
|
||||
ColumnChanged();
|
||||
}
|
||||
|
||||
public void AddColumn(RollColumn column)
|
||||
{
|
||||
Columns.Add(column);
|
||||
ColumnChanged();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Paint
|
||||
|
@ -298,6 +298,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private bool NeedToReDrawColumn = false;
|
||||
private void ColumnChanged()
|
||||
{
|
||||
NeedToReDrawColumn = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void TasStudioExperiment_Load(object sender, EventArgs e)
|
||||
{
|
||||
InputView.Columns.AddRange(new []
|
||||
InputView.AddColumns(new []
|
||||
{
|
||||
new RollColumn
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue