InputRoll - reorg - put in its own folder, break out column and cell classes into separate files
This commit is contained in:
parent
14ffd143d4
commit
b54be19e9e
|
@ -587,13 +587,17 @@
|
|||
<Compile Include="CustomControls\InputConfigBase.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CustomControls\InputRoll.cs">
|
||||
<Compile Include="CustomControls\InputRoll\Cell.cs" />
|
||||
<Compile Include="CustomControls\InputRoll\ColumnType.cs" />
|
||||
<Compile Include="CustomControls\InputRoll\InputRoll.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CustomControls\InputRoll.Drawing.cs">
|
||||
<Compile Include="CustomControls\InputRoll\InputRoll.Drawing.cs">
|
||||
<DependentUpon>InputRoll.cs</DependentUpon>
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CustomControls\InputRoll\RollColumn.cs" />
|
||||
<Compile Include="CustomControls\InputRoll\RollColumns.cs" />
|
||||
<Compile Include="CustomControls\MenuButton.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a single cell of the <seealso cref="InputRoll"/>
|
||||
/// </summary>
|
||||
public class Cell
|
||||
{
|
||||
public RollColumn Column { get; internal set; }
|
||||
public int? RowIndex { get; internal set; }
|
||||
public string CurrentText { get; internal set; }
|
||||
|
||||
public Cell() { }
|
||||
|
||||
public Cell(Cell cell)
|
||||
{
|
||||
Column = cell.Column;
|
||||
RowIndex = cell.RowIndex;
|
||||
}
|
||||
|
||||
public bool IsDataCell => Column != null && RowIndex.HasValue;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is Cell)
|
||||
{
|
||||
var cell = obj as Cell;
|
||||
return this.Column == cell.Column && this.RowIndex == cell.RowIndex;
|
||||
}
|
||||
|
||||
return base.Equals(obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Column.GetHashCode() + RowIndex.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
internal class SortCell : IComparer<Cell>
|
||||
{
|
||||
int IComparer<Cell>.Compare(Cell a, Cell b)
|
||||
{
|
||||
Cell c1 = a as Cell;
|
||||
Cell c2 = b as Cell;
|
||||
if (c1.RowIndex.HasValue)
|
||||
{
|
||||
if (c2.RowIndex.HasValue)
|
||||
{
|
||||
int row = c1.RowIndex.Value.CompareTo(c2.RowIndex.Value);
|
||||
if (row == 0)
|
||||
{
|
||||
return c1.Column.Name.CompareTo(c2.Column.Name);
|
||||
}
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (c2.RowIndex.HasValue)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return c1.Column.Name.CompareTo(c2.Column.Name);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the type of column of a <see cref="RollColumn"/>
|
||||
/// </summary>
|
||||
public enum ColumnType
|
||||
{
|
||||
Boolean, Float, Text, Image
|
||||
}
|
||||
}
|
|
@ -1150,7 +1150,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
// do marker drag here
|
||||
}
|
||||
else if (ModifierKeys == Keys.Shift && (CurrentCell.Column.Name == "FrameColumn" || CurrentCell.Column.Type == RollColumn.InputType.Text))
|
||||
else if (ModifierKeys == Keys.Shift && (CurrentCell.Column.Name == "FrameColumn" || CurrentCell.Column.Type == ColumnType.Text))
|
||||
{
|
||||
if (_selectedItems.Any())
|
||||
{
|
||||
|
@ -1219,7 +1219,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
SelectCell(CurrentCell);
|
||||
}
|
||||
}
|
||||
else if (ModifierKeys == Keys.Control && (CurrentCell.Column.Name == "FrameColumn" || CurrentCell.Column.Type == RollColumn.InputType.Text))
|
||||
else if (ModifierKeys == Keys.Control && (CurrentCell.Column.Name == "FrameColumn" || CurrentCell.Column.Type == ColumnType.Text))
|
||||
{
|
||||
SelectCell(CurrentCell, toggle: true);
|
||||
}
|
||||
|
@ -2064,251 +2064,5 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Classes
|
||||
|
||||
public class RollColumns : List<RollColumn>
|
||||
{
|
||||
public RollColumn this[string name]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.SingleOrDefault(column => column.Name == name);
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<RollColumn> VisibleColumns
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Where(c => c.Visible);
|
||||
}
|
||||
}
|
||||
|
||||
public Action ChangedCallback { get; set; }
|
||||
|
||||
private void DoChangeCallback()
|
||||
{
|
||||
// no check will make it crash for user too, not sure which way of alarm we prefer. no alarm at all will cause all sorts of subtle bugs
|
||||
if (ChangedCallback == null)
|
||||
{
|
||||
System.Diagnostics.Debug.Fail($"{nameof(ColumnChangedCallback)} has died!");
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangedCallback();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: this shouldn't be exposed. But in order to not expose it, each RollColumn must have a change callback, and all property changes must call it, it is quicker and easier to just call this when needed
|
||||
public void ColumnsChanged()
|
||||
{
|
||||
int pos = 0;
|
||||
|
||||
foreach (var col in VisibleColumns)
|
||||
{
|
||||
col.Left = pos;
|
||||
pos += col.Width.Value;
|
||||
col.Right = pos;
|
||||
}
|
||||
|
||||
DoChangeCallback();
|
||||
}
|
||||
|
||||
public new void Add(RollColumn column)
|
||||
{
|
||||
if (this.Any(c => c.Name == column.Name))
|
||||
{
|
||||
// The designer sucks, doing nothing for now
|
||||
return;
|
||||
//throw new InvalidOperationException("A column with this name already exists.");
|
||||
}
|
||||
|
||||
base.Add(column);
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public new void AddRange(IEnumerable<RollColumn> collection)
|
||||
{
|
||||
foreach (var column in collection)
|
||||
{
|
||||
if (this.Any(c => c.Name == column.Name))
|
||||
{
|
||||
// The designer sucks, doing nothing for now
|
||||
return;
|
||||
|
||||
throw new InvalidOperationException("A column with this name already exists.");
|
||||
}
|
||||
}
|
||||
|
||||
base.AddRange(collection);
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public new void Insert(int index, RollColumn column)
|
||||
{
|
||||
if (this.Any(c => c.Name == column.Name))
|
||||
{
|
||||
throw new InvalidOperationException("A column with this name already exists.");
|
||||
}
|
||||
|
||||
base.Insert(index, column);
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public new void InsertRange(int index, IEnumerable<RollColumn> collection)
|
||||
{
|
||||
foreach (var column in collection)
|
||||
{
|
||||
if (this.Any(c => c.Name == column.Name))
|
||||
{
|
||||
throw new InvalidOperationException("A column with this name already exists.");
|
||||
}
|
||||
}
|
||||
|
||||
base.InsertRange(index, collection);
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public new bool Remove(RollColumn column)
|
||||
{
|
||||
var result = base.Remove(column);
|
||||
ColumnsChanged();
|
||||
return result;
|
||||
}
|
||||
|
||||
public new int RemoveAll(Predicate<RollColumn> match)
|
||||
{
|
||||
var result = base.RemoveAll(match);
|
||||
ColumnsChanged();
|
||||
return result;
|
||||
}
|
||||
|
||||
public new void RemoveAt(int index)
|
||||
{
|
||||
base.RemoveAt(index);
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public new void RemoveRange(int index, int count)
|
||||
{
|
||||
base.RemoveRange(index, count);
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public new void Clear()
|
||||
{
|
||||
base.Clear();
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public IEnumerable<string> Groups
|
||||
{
|
||||
get
|
||||
{
|
||||
return this
|
||||
.Select(x => x.Group)
|
||||
.Distinct();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class RollColumn
|
||||
{
|
||||
public enum InputType { Boolean, Float, Text, Image }
|
||||
|
||||
public string Group { get; set; }
|
||||
public int? Width { get; set; }
|
||||
public int? Left { get; set; }
|
||||
public int? Right { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Text { get; set; }
|
||||
public InputType Type { get; set; }
|
||||
public bool Visible { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Column will be drawn with an emphasized look, if true
|
||||
/// </summary>
|
||||
private bool _emphasis;
|
||||
public bool Emphasis
|
||||
{
|
||||
get { return _emphasis; }
|
||||
set { _emphasis = value; }
|
||||
}
|
||||
|
||||
public RollColumn()
|
||||
{
|
||||
Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a single cell of the <seealso cref="InputRoll"/>
|
||||
/// </summary>
|
||||
public class Cell
|
||||
{
|
||||
public RollColumn Column { get; internal set; }
|
||||
public int? RowIndex { get; internal set; }
|
||||
public string CurrentText { get; internal set; }
|
||||
|
||||
public Cell() { }
|
||||
|
||||
public Cell(Cell cell)
|
||||
{
|
||||
Column = cell.Column;
|
||||
RowIndex = cell.RowIndex;
|
||||
}
|
||||
|
||||
public bool IsDataCell => Column != null && RowIndex.HasValue;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is Cell)
|
||||
{
|
||||
var cell = obj as Cell;
|
||||
return this.Column == cell.Column && this.RowIndex == cell.RowIndex;
|
||||
}
|
||||
|
||||
return base.Equals(obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Column.GetHashCode() + RowIndex.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
private class SortCell : IComparer<Cell>
|
||||
{
|
||||
int IComparer<Cell>.Compare(Cell a, Cell b)
|
||||
{
|
||||
Cell c1 = a as Cell;
|
||||
Cell c2 = b as Cell;
|
||||
if (c1.RowIndex.HasValue)
|
||||
{
|
||||
if (c2.RowIndex.HasValue)
|
||||
{
|
||||
int row = c1.RowIndex.Value.CompareTo(c2.RowIndex.Value);
|
||||
if (row == 0)
|
||||
{
|
||||
return c1.Column.Name.CompareTo(c2.Column.Name);
|
||||
}
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (c2.RowIndex.HasValue)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return c1.Column.Name.CompareTo(c2.Column.Name);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public class RollColumn
|
||||
{
|
||||
public string Group { get; set; }
|
||||
public int? Width { get; set; }
|
||||
public int? Left { get; set; }
|
||||
public int? Right { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Text { get; set; }
|
||||
public ColumnType Type { get; set; }
|
||||
public bool Visible { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Column will be drawn with an emphasized look, if true
|
||||
/// </summary>
|
||||
private bool _emphasis;
|
||||
public bool Emphasis
|
||||
{
|
||||
get { return _emphasis; }
|
||||
set { _emphasis = value; }
|
||||
}
|
||||
|
||||
public RollColumn()
|
||||
{
|
||||
Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,152 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public class RollColumns : List<RollColumn>
|
||||
{
|
||||
public RollColumn this[string name]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.SingleOrDefault(column => column.Name == name);
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<RollColumn> VisibleColumns
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Where(c => c.Visible);
|
||||
}
|
||||
}
|
||||
|
||||
public Action ChangedCallback { get; set; }
|
||||
|
||||
private void DoChangeCallback()
|
||||
{
|
||||
// no check will make it crash for user too, not sure which way of alarm we prefer. no alarm at all will cause all sorts of subtle bugs
|
||||
if (ChangedCallback == null)
|
||||
{
|
||||
System.Diagnostics.Debug.Fail($"{nameof(ChangedCallback)} has died!");
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangedCallback();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: this shouldn't be exposed. But in order to not expose it, each RollColumn must have a change callback, and all property changes must call it, it is quicker and easier to just call this when needed
|
||||
public void ColumnsChanged()
|
||||
{
|
||||
int pos = 0;
|
||||
|
||||
foreach (var col in VisibleColumns)
|
||||
{
|
||||
col.Left = pos;
|
||||
pos += col.Width.Value;
|
||||
col.Right = pos;
|
||||
}
|
||||
|
||||
DoChangeCallback();
|
||||
}
|
||||
|
||||
public new void Add(RollColumn column)
|
||||
{
|
||||
if (this.Any(c => c.Name == column.Name))
|
||||
{
|
||||
// The designer sucks, doing nothing for now
|
||||
return;
|
||||
//throw new InvalidOperationException("A column with this name already exists.");
|
||||
}
|
||||
|
||||
base.Add(column);
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public new void AddRange(IEnumerable<RollColumn> collection)
|
||||
{
|
||||
foreach (var column in collection)
|
||||
{
|
||||
if (this.Any(c => c.Name == column.Name))
|
||||
{
|
||||
// The designer sucks, doing nothing for now
|
||||
return;
|
||||
|
||||
throw new InvalidOperationException("A column with this name already exists.");
|
||||
}
|
||||
}
|
||||
|
||||
base.AddRange(collection);
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public new void Insert(int index, RollColumn column)
|
||||
{
|
||||
if (this.Any(c => c.Name == column.Name))
|
||||
{
|
||||
throw new InvalidOperationException("A column with this name already exists.");
|
||||
}
|
||||
|
||||
base.Insert(index, column);
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public new void InsertRange(int index, IEnumerable<RollColumn> collection)
|
||||
{
|
||||
foreach (var column in collection)
|
||||
{
|
||||
if (this.Any(c => c.Name == column.Name))
|
||||
{
|
||||
throw new InvalidOperationException("A column with this name already exists.");
|
||||
}
|
||||
}
|
||||
|
||||
base.InsertRange(index, collection);
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public new bool Remove(RollColumn column)
|
||||
{
|
||||
var result = base.Remove(column);
|
||||
ColumnsChanged();
|
||||
return result;
|
||||
}
|
||||
|
||||
public new int RemoveAll(Predicate<RollColumn> match)
|
||||
{
|
||||
var result = base.RemoveAll(match);
|
||||
ColumnsChanged();
|
||||
return result;
|
||||
}
|
||||
|
||||
public new void RemoveAt(int index)
|
||||
{
|
||||
base.RemoveAt(index);
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public new void RemoveRange(int index, int count)
|
||||
{
|
||||
base.RemoveRange(index, count);
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public new void Clear()
|
||||
{
|
||||
base.Clear();
|
||||
ColumnsChanged();
|
||||
}
|
||||
|
||||
public IEnumerable<string> Groups
|
||||
{
|
||||
get
|
||||
{
|
||||
return this
|
||||
.Select(x => x.Group)
|
||||
.Distinct();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -64,19 +64,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
lvCDL.AllColumns.Clear();
|
||||
lvCDL.AllColumns.AddRange(new []
|
||||
{
|
||||
new InputRoll.RollColumn { Name = "CDLFile", Text = "CDL File @", Width = 107, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = "Domain", Text = "Domain", Width = 126, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = "Percent", Text = "%", Width = 58, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = "Mapped", Text = "Mapped", Width = 64, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = "Size", Text = "Size", Width = 112, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = "0x01", Text = "0x01", Width = 56, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = "0x02", Text = "0x02", Width = 56, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = "0x04", Text = "0x04", Width = 56, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = "0x08", Text = "0x08", Width = 56, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = "0x10", Text = "0x10", Width = 56, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = "0x20", Text = "0x20", Width = 56, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = "0x40", Text = "0x40", Width = 56, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = "0x80", Text = "0x80", Width = 56, Type = InputRoll.RollColumn.InputType.Text }
|
||||
new RollColumn { Name = "CDLFile", Text = "CDL File @", Width = 107, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "Domain", Text = "Domain", Width = 126, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "Percent", Text = "%", Width = 58, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "Mapped", Text = "Mapped", Width = 64, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "Size", Text = "Size", Width = 112, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x01", Text = "0x01", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x02", Text = "0x02", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x04", Text = "0x04", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x08", Text = "0x08", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x10", Text = "0x10", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x20", Text = "0x20", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x40", Text = "0x40", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x80", Text = "0x80", Width = 56, Type = ColumnType.Text }
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -576,7 +576,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
CodeDataLogger.SetCDL(null);
|
||||
}
|
||||
|
||||
private void lvCDL_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
private void lvCDL_QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
var subItem = lvCDL.AllColumns.IndexOf(column);
|
||||
text = listContents[index][subItem];
|
||||
|
|
|
@ -239,7 +239,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
SetColumns();
|
||||
}
|
||||
|
||||
private void CheatListView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
private void CheatListView_QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
text = "";
|
||||
if (index >= Global.CheatList.Count || Global.CheatList[index].IsSeparator)
|
||||
|
@ -311,7 +311,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void CheatListView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
|
||||
private void CheatListView_QueryItemBkColor(int index, RollColumn column, ref Color color)
|
||||
{
|
||||
if (index < Global.CheatList.Count)
|
||||
{
|
||||
|
@ -737,21 +737,21 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public CheatsSettings()
|
||||
{
|
||||
Columns = new List<InputRoll.RollColumn>
|
||||
Columns = new List<RollColumn>
|
||||
{
|
||||
new InputRoll.RollColumn { Text = "Names", Name = NameColumn, Visible = true, Width = 128, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Address", Name = AddressColumn, Visible = true, Width = 60, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Value", Name = ValueColumn, Visible = true, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Compare", Name = CompareColumn, Visible = true, Width = 63, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Compare Type", Name = ComparisonTypeColumn, Visible = true, Width = 98, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "On", Name = OnColumn, Visible = false, Width = 28, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Size", Name = SizeColumn, Visible = true, Width = 55, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Endian", Name = EndianColumn, Visible = false, Width = 55, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Display Type", Name = TypeColumn, Visible = false, Width = 88, Type = InputRoll.RollColumn.InputType.Text }
|
||||
new RollColumn { Text = "Names", Name = NameColumn, Visible = true, Width = 128, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Address", Name = AddressColumn, Visible = true, Width = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Value", Name = ValueColumn, Visible = true, Width = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Compare", Name = CompareColumn, Visible = true, Width = 63, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Compare Type", Name = ComparisonTypeColumn, Visible = true, Width = 98, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "On", Name = OnColumn, Visible = false, Width = 28, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Size", Name = SizeColumn, Visible = true, Width = 55, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Endian", Name = EndianColumn, Visible = false, Width = 55, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Display Type", Name = TypeColumn, Visible = false, Width = 88, Type = ColumnType.Text }
|
||||
};
|
||||
}
|
||||
|
||||
public List<InputRoll.RollColumn> Columns { get; set; }
|
||||
public List<RollColumn> Columns { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void DisassemblerView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
private void DisassemblerView_QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
text = "";
|
||||
|
||||
|
@ -84,7 +84,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void DisassemblerView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
|
||||
private void DisassemblerView_QueryItemBkColor(int index, RollColumn column, ref Color color)
|
||||
{
|
||||
if (_disassemblyLines.Any() && index < _disassemblyLines.Count)
|
||||
{
|
||||
|
|
|
@ -23,19 +23,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
DisassemblerView.AllColumns.Clear();
|
||||
DisassemblerView.AllColumns.AddRange(new[]
|
||||
{
|
||||
new InputRoll.RollColumn
|
||||
new RollColumn
|
||||
{
|
||||
Name = AddressColumnName,
|
||||
Text = AddressColumnName,
|
||||
Width = 94,
|
||||
Type = InputRoll.RollColumn.InputType.Text
|
||||
Type = ColumnType.Text
|
||||
},
|
||||
new InputRoll.RollColumn
|
||||
new RollColumn
|
||||
{
|
||||
Name = InstructionColumnName,
|
||||
Text = InstructionColumnName,
|
||||
Width = 291,
|
||||
Type = InputRoll.RollColumn.InputType.Text
|
||||
Type = ColumnType.Text
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -587,7 +587,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (Engaged())
|
||||
{
|
||||
Tastudio.AddColumn(name, text, width, InputRoll.RollColumn.InputType.Text);
|
||||
Tastudio.AddColumn(name, text, width, ColumnType.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,15 +38,15 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public LuaConsoleSettings()
|
||||
{
|
||||
Columns = new List<InputRoll.RollColumn>
|
||||
Columns = new List<RollColumn>
|
||||
{
|
||||
new InputRoll.RollColumn { Name = IconColumnName, Text = " ", Visible = true, Width = 22, Type = InputRoll.RollColumn.InputType.Image },
|
||||
new InputRoll.RollColumn { Name = ScriptColumnName, Text = "Script", Visible = true, Width = 92, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = PathColumnName, Text = "Path", Visible = true, Width = 300, Type = InputRoll.RollColumn.InputType.Text }
|
||||
new RollColumn { Name = IconColumnName, Text = " ", Visible = true, Width = 22, Type = ColumnType.Image },
|
||||
new RollColumn { Name = ScriptColumnName, Text = "Script", Visible = true, Width = 92, Type = ColumnType.Text },
|
||||
new RollColumn { Name = PathColumnName, Text = "Path", Visible = true, Width = 300, Type = ColumnType.Text }
|
||||
};
|
||||
}
|
||||
|
||||
public List<InputRoll.RollColumn> Columns { get; set; }
|
||||
public List<RollColumn> Columns { get; set; }
|
||||
}
|
||||
|
||||
[ConfigPersist]
|
||||
|
@ -362,7 +362,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
Path.GetFileName(LuaImp.ScriptList.Filename);
|
||||
}
|
||||
|
||||
private void LuaListView_QueryItemImage(int index, InputRoll.RollColumn column, ref Bitmap bitmap, ref int offsetX, ref int offsetY)
|
||||
private void LuaListView_QueryItemImage(int index, RollColumn column, ref Bitmap bitmap, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
if (column.Name != IconColumnName)
|
||||
{
|
||||
|
@ -388,7 +388,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void LuaListView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
|
||||
private void LuaListView_QueryItemBkColor(int index, RollColumn column, ref Color color)
|
||||
{
|
||||
if (LuaImp.ScriptList[index].IsSeparator)
|
||||
{
|
||||
|
@ -404,7 +404,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void LuaListView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
private void LuaListView_QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
text = "";
|
||||
|
||||
|
|
|
@ -63,19 +63,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
BranchView.AllColumns.AddRange(new[]
|
||||
{
|
||||
new InputRoll.RollColumn
|
||||
new RollColumn
|
||||
{
|
||||
Name = BranchNumberColumnName,
|
||||
Text = "#",
|
||||
Width = 30
|
||||
},
|
||||
new InputRoll.RollColumn
|
||||
new RollColumn
|
||||
{
|
||||
Name = FrameColumnName,
|
||||
Text = "Frame",
|
||||
Width = 64
|
||||
},
|
||||
new InputRoll.RollColumn
|
||||
new RollColumn
|
||||
{
|
||||
Name = UserTextColumnName,
|
||||
Text = "UserText",
|
||||
|
@ -89,7 +89,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
#region Query callbacks
|
||||
|
||||
private void QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
private void QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
text = "";
|
||||
|
||||
|
@ -112,7 +112,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
|
||||
private void QueryItemBkColor(int index, RollColumn column, ref Color color)
|
||||
{
|
||||
TasBranch branch = GetBranch(index);
|
||||
if (branch != null)
|
||||
|
|
|
@ -21,13 +21,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
MarkerView.AllColumns.AddRange(new[]
|
||||
{
|
||||
new InputRoll.RollColumn
|
||||
new RollColumn
|
||||
{
|
||||
Name = "FrameColumn",
|
||||
Text = "Frame",
|
||||
Width = 52
|
||||
},
|
||||
new InputRoll.RollColumn
|
||||
new RollColumn
|
||||
{
|
||||
Name = "LabelColumn",
|
||||
Text = "",
|
||||
|
@ -45,7 +45,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public InputRoll MarkerInputRoll => MarkerView;
|
||||
|
||||
private void MarkerView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
|
||||
private void MarkerView_QueryItemBkColor(int index, RollColumn column, ref Color color)
|
||||
{
|
||||
var prev = Markers.PreviousOrCurrent(Tastudio.Emulator.Frame);
|
||||
|
||||
|
@ -81,7 +81,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void MarkerView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
private void MarkerView_QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
text = "";
|
||||
|
||||
|
|
|
@ -15,17 +15,17 @@ namespace BizHawk.Client.EmuHawk
|
|||
public Action<int> BranchSavedCallback { get; set; }
|
||||
public Action<int> BranchRemovedCallback { get; set; }
|
||||
|
||||
private Color? GetColorOverride(int index, InputRoll.RollColumn column)
|
||||
private Color? GetColorOverride(int index, RollColumn column)
|
||||
{
|
||||
return QueryItemBgColorCallback?.Invoke(index, column.Name);
|
||||
}
|
||||
|
||||
private string GetTextOverride(int index, InputRoll.RollColumn column)
|
||||
private string GetTextOverride(int index, RollColumn column)
|
||||
{
|
||||
return QueryItemTextCallback?.Invoke(index, column.Name);
|
||||
}
|
||||
|
||||
private Bitmap GetIconOverride(int index, InputRoll.RollColumn column)
|
||||
private Bitmap GetIconOverride(int index, RollColumn column)
|
||||
{
|
||||
return QueryItemIconCallback?.Invoke(index, column.Name);
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private Bitmap icon_anchor_lag => Properties.Resources.icon_anchor_lag;
|
||||
private Bitmap icon_anchor => Properties.Resources.icon_anchor;
|
||||
|
||||
private void TasView_QueryItemIcon(int index, InputRoll.RollColumn column, ref Bitmap bitmap, ref int offsetX, ref int offsetY)
|
||||
private void TasView_QueryItemIcon(int index, RollColumn column, ref Bitmap bitmap, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
var overrideIcon = GetIconOverride(index, column);
|
||||
|
||||
|
@ -214,7 +214,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void TasView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
|
||||
private void TasView_QueryItemBkColor(int index, RollColumn column, ref Color color)
|
||||
{
|
||||
Color? overrideColor = GetColorOverride(index, column);
|
||||
|
||||
|
@ -296,7 +296,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void TasView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
private void TasView_QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
var overrideText = GetTextOverride(index, column);
|
||||
if (overrideText != null)
|
||||
|
@ -333,7 +333,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
else if (index < CurrentTasMovie.InputLogLength)
|
||||
{
|
||||
text = CurrentTasMovie.DisplayValue(index, columnName);
|
||||
if (column.Type == InputRoll.RollColumn.InputType.Float)
|
||||
if (column.Type == ColumnType.Float)
|
||||
{
|
||||
// feos: this could be cashed, but I don't notice any slowdown this way either
|
||||
ControllerDefinition.FloatRange range = Global.MovieSession.MovieControllerAdapter.Definition.FloatRanges
|
||||
|
@ -601,7 +601,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
_selectionDragState = TasView.SelectedRows.Contains(frame);
|
||||
}
|
||||
}
|
||||
else if (TasView.CurrentCell.Column.Type != InputRoll.RollColumn.InputType.Text) // User changed input
|
||||
else if (TasView.CurrentCell.Column.Type != ColumnType.Text) // User changed input
|
||||
{
|
||||
bool wasPaused = Mainform.EmulatorPaused;
|
||||
|
||||
|
|
|
@ -1267,7 +1267,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
playerMenus[i] = new ToolStripMenuItem($"Player {i}");
|
||||
}
|
||||
|
||||
foreach (InputRoll.RollColumn column in columns)
|
||||
foreach (var column in columns)
|
||||
{
|
||||
ToolStripMenuItem menuItem = new ToolStripMenuItem
|
||||
{
|
||||
|
|
|
@ -416,18 +416,18 @@ namespace BizHawk.Client.EmuHawk
|
|||
var columnNames = GenerateColumnNames();
|
||||
foreach (var kvp in columnNames)
|
||||
{
|
||||
InputRoll.RollColumn.InputType type;
|
||||
ColumnType type;
|
||||
int digits;
|
||||
if (Global.MovieSession.MovieControllerAdapter.Definition.FloatControls.Contains(kvp.Key))
|
||||
{
|
||||
ControllerDefinition.FloatRange range = Global.MovieSession.MovieControllerAdapter.Definition.FloatRanges
|
||||
[Global.MovieSession.MovieControllerAdapter.Definition.FloatControls.IndexOf(kvp.Key)];
|
||||
type = InputRoll.RollColumn.InputType.Float;
|
||||
type = ColumnType.Float;
|
||||
digits = Math.Max(kvp.Value.Length, range.MaxDigits());
|
||||
}
|
||||
else
|
||||
{
|
||||
type = InputRoll.RollColumn.InputType.Boolean;
|
||||
type = ColumnType.Boolean;
|
||||
digits = kvp.Value.Length;
|
||||
}
|
||||
|
||||
|
@ -494,11 +494,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
SetUpToolStripColumns();
|
||||
}
|
||||
|
||||
public void AddColumn(string columnName, string columnText, int columnWidth, InputRoll.RollColumn.InputType columnType = InputRoll.RollColumn.InputType.Boolean)
|
||||
public void AddColumn(string columnName, string columnText, int columnWidth, ColumnType columnType = ColumnType.Boolean)
|
||||
{
|
||||
if (TasView.AllColumns[columnName] == null)
|
||||
{
|
||||
var column = new InputRoll.RollColumn
|
||||
var column = new RollColumn
|
||||
{
|
||||
Name = columnName,
|
||||
Text = columnText,
|
||||
|
|
|
@ -26,21 +26,21 @@ namespace BizHawk.Client.EmuHawk
|
|||
HistoryView.AllColumns.Clear();
|
||||
HistoryView.AllColumns.AddRange(new[]
|
||||
{
|
||||
new InputRoll.RollColumn { Name = IdColumnName, Text = IdColumnName, Width = 40, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Name = UndoColumnName, Text = UndoColumnName, Width = 280, Type = InputRoll.RollColumn.InputType.Text }
|
||||
new RollColumn { Name = IdColumnName, Text = IdColumnName, Width = 40, Type = ColumnType.Text },
|
||||
new RollColumn { Name = UndoColumnName, Text = UndoColumnName, Width = 280, Type = ColumnType.Text }
|
||||
});
|
||||
|
||||
MaxStepsNum.Value = Log.MaxSteps;
|
||||
}
|
||||
|
||||
private void HistoryView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
private void HistoryView_QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
text = column.Name == UndoColumnName
|
||||
? Log.Names[index]
|
||||
: index.ToString();
|
||||
}
|
||||
|
||||
private void HistoryView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
|
||||
private void HistoryView_QueryItemBkColor(int index, RollColumn column, ref Color color)
|
||||
{
|
||||
if (index == Log.UndoIndex)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private int FileSizeCap { get; set; }
|
||||
|
||||
[ConfigPersist]
|
||||
private List<InputRoll.RollColumn> Columns
|
||||
private List<RollColumn> Columns
|
||||
{
|
||||
get { return TraceView.AllColumns; }
|
||||
set
|
||||
|
@ -78,19 +78,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
_splitFile = FileSizeCap != 0;
|
||||
|
||||
TraceView.AllColumns.Clear();
|
||||
TraceView.AllColumns.Add(new InputRoll.RollColumn
|
||||
TraceView.AllColumns.Add(new RollColumn
|
||||
{
|
||||
Name = DisasmColumnName,
|
||||
Text = DisasmColumnName,
|
||||
Width = 239,
|
||||
Type = InputRoll.RollColumn.InputType.Text
|
||||
Type = ColumnType.Text
|
||||
});
|
||||
TraceView.AllColumns.Add(new InputRoll.RollColumn
|
||||
TraceView.AllColumns.Add(new RollColumn
|
||||
{
|
||||
Name = RegistersColumnName,
|
||||
Text = RegistersColumnName,
|
||||
Width = 357,
|
||||
Type = InputRoll.RollColumn.InputType.Text
|
||||
Type = ColumnType.Text
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
//Tracer.Enabled = LoggingEnabled.Checked;
|
||||
}
|
||||
|
||||
private void TraceView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
private void TraceView_QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
text = "";
|
||||
if (index < _instructions.Count)
|
||||
|
|
|
@ -166,7 +166,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
ErrorIconButton.Visible = _searches.OutOfRangeAddress.Any();
|
||||
}
|
||||
|
||||
private void ListView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
|
||||
private void ListView_QueryItemBkColor(int index, RollColumn column, ref Color color)
|
||||
{
|
||||
if (_searches.Count > 0)
|
||||
{
|
||||
|
@ -195,7 +195,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void ListView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
private void ListView_QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
text = "";
|
||||
|
||||
|
@ -974,13 +974,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public RamSearchSettings()
|
||||
{
|
||||
Columns = new List<InputRoll.RollColumn>
|
||||
Columns = new List<RollColumn>
|
||||
{
|
||||
new InputRoll.RollColumn { Text = "Address", Name = WatchList.ADDRESS, Visible = true, Width = 60, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Value", Name = WatchList.VALUE, Visible = true, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Prev", Name = WatchList.PREV, Visible = true, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Changes", Name = WatchList.CHANGES, Visible = true, Width = 60, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Diff", Name = WatchList.DIFF, Visible = false, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new RollColumn { Text = "Address", Name = WatchList.ADDRESS, Visible = true, Width = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Value", Name = WatchList.VALUE, Visible = true, Width = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Prev", Name = WatchList.PREV, Visible = true, Width = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Changes", Name = WatchList.CHANGES, Visible = true, Width = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Diff", Name = WatchList.DIFF, Visible = false, Width = 59, Type = ColumnType.Text },
|
||||
};
|
||||
|
||||
PreviewMode = true;
|
||||
|
@ -988,7 +988,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
AutoSearchTakeLagFramesIntoAccount = true;
|
||||
}
|
||||
|
||||
public List<InputRoll.RollColumn> Columns { get; set; }
|
||||
public List<RollColumn> Columns { get; set; }
|
||||
public bool PreviewMode { get; set; }
|
||||
public bool AlwaysExcludeRamWatch { get; set; }
|
||||
public bool AutoSearchTakeLagFramesIntoAccount { get; set; }
|
||||
|
|
|
@ -79,20 +79,20 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public RamWatchSettings()
|
||||
{
|
||||
Columns = new List<InputRoll.RollColumn>
|
||||
Columns = new List<RollColumn>
|
||||
{
|
||||
new InputRoll.RollColumn { Text = "Address", Name = WatchList.ADDRESS, Visible = true, Width = 60, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Value", Name = WatchList.VALUE, Visible = true, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Prev", Name = WatchList.PREV, Visible = false, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Changes", Name = WatchList.CHANGES, Visible = true, Width = 60, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Diff", Name = WatchList.DIFF, Visible = false, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Type", Name = WatchList.TYPE, Visible = false, Width = 55, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Domain", Name = WatchList.DOMAIN, Visible = true, Width = 55, Type = InputRoll.RollColumn.InputType.Text },
|
||||
new InputRoll.RollColumn { Text = "Notes", Name = WatchList.NOTES, Visible = true, Width = 128, Type = InputRoll.RollColumn.InputType.Text }
|
||||
new RollColumn { Text = "Address", Name = WatchList.ADDRESS, Visible = true, Width = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Value", Name = WatchList.VALUE, Visible = true, Width = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Prev", Name = WatchList.PREV, Visible = false, Width = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Changes", Name = WatchList.CHANGES, Visible = true, Width = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Diff", Name = WatchList.DIFF, Visible = false, Width = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Type", Name = WatchList.TYPE, Visible = false, Width = 55, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Domain", Name = WatchList.DOMAIN, Visible = true, Width = 55, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Notes", Name = WatchList.NOTES, Visible = true, Width = 128, Type = ColumnType.Text }
|
||||
};
|
||||
}
|
||||
|
||||
public List<InputRoll.RollColumn> Columns { get; set; }
|
||||
public List<RollColumn> Columns { get; set; }
|
||||
}
|
||||
|
||||
private IEnumerable<int> SelectedIndices => WatchListView.SelectedRows;
|
||||
|
@ -553,7 +553,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void OrderColumn(InputRoll.RollColumn column)
|
||||
private void OrderColumn(RollColumn column)
|
||||
{
|
||||
if (column.Name != _sortedColumn)
|
||||
{
|
||||
|
@ -621,7 +621,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
WatchCountLabel.Text = _watches.WatchCount + (_watches.WatchCount == 1 ? " watch" : " watches");
|
||||
}
|
||||
|
||||
private void WatchListView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
|
||||
private void WatchListView_QueryItemBkColor(int index, RollColumn column, ref Color color)
|
||||
{
|
||||
if (index >= _watches.Count)
|
||||
{
|
||||
|
@ -642,7 +642,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void WatchListView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
private void WatchListView_QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY)
|
||||
{
|
||||
text = "";
|
||||
if (index >= _watches.Count)
|
||||
|
|
Loading…
Reference in New Issue