diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs index 1d88955e17..6c20a43772 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs @@ -270,11 +270,10 @@ namespace BizHawk.Client.EmuHawk [Category("Behavior")] public event RightMouseScrollEventHandler RightMouseScrolled; - // TODO: change this to pass in a column object instead of an index (which forces the caller to look up the column /// /// Retrieve the text for a cell /// - public delegate void QueryItemTextHandler(int index, int column, out string text); + public delegate void QueryItemTextHandler(int index, RollColumn column, out string text); // TODO: change this to pass in a column object instead of an index (which forces the caller to look up the column /// @@ -619,7 +618,7 @@ namespace BizHawk.Client.EmuHawk for (int j = 0; j < columns.Count; j++) { string text; - QueryItemText(i + startIndex, j, out text); + QueryItemText(i + startIndex, columns[j], out text); //Center Text int x = RowsToPixels(i) + (CellWidth - text.Length * _charSize.Width) / 2; @@ -663,7 +662,7 @@ namespace BizHawk.Client.EmuHawk } else { - QueryItemText(i + startRow, j, out text); + QueryItemText(i + startRow, columns[j], out text); if (!string.IsNullOrWhiteSpace(text)) { Gdi.DrawString(text, point); diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs index 8b221c59bd..bbe9c9a303 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs @@ -74,15 +74,15 @@ namespace BizHawk.Client.EmuHawk } - private void MarkerView_QueryItemText(int index, int column, out string text) + private void MarkerView_QueryItemText(int index, InputRoll.RollColumn column, out string text) { text = ""; - if (column == 0) + if (column.Name == "FrameColumn") { text = Tastudio.CurrentMovie.Markers[index].Frame.ToString(); } - else if (column == 1) + else if (column.Name == "LabelColumn") { text = Tastudio.CurrentMovie.Markers[index].Message; } diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs index 1b05a81056..e3a4d26cfe 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs @@ -148,12 +148,12 @@ namespace BizHawk.Client.EmuHawk } } - private void TasView_QueryItemText(int index, int column, out string text) + private void TasView_QueryItemText(int index, InputRoll.RollColumn column, out string text) { try { text = string.Empty; - var columnName = TasView.VisibleColumns.ToList()[column].Name; // TODO: don't do this when a column object is passed in instead of an int + var columnName = column.Name; if (columnName == MarkerColumnName) {