Input roll - some tinkering

This commit is contained in:
adelikat 2014-08-08 18:30:57 +00:00
parent 97b40bc020
commit 1d29c7e281
2 changed files with 20 additions and 14 deletions

View File

@ -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
}

View File

@ -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
{