tastudio:
- set Float type to analog control columns - set their size taking into account their MaxDigits - stop displaying neutral analog values input OSD: - obtain real neutral analog value the given core uses and hide it, instead of hiding hardcoded zero
This commit is contained in:
parent
3ea3012aa7
commit
a8dde12c1f
|
@ -42,10 +42,11 @@ namespace BizHawk.Client.Common
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
string neutral = _source.Type.FloatRanges[0].Mid.ToString().PadLeft(5, ' ') + ',';
|
||||
return le
|
||||
.Replace(".", " ")
|
||||
.Replace("|", "")
|
||||
.Replace(" 0,", " "); //zero 04-aug-2015 - changed from a 2-dimensional type string to support emptying out the one-dimensional PSX disc select control
|
||||
.Replace(neutral, " "); //zero 04-aug-2015 - changed from a 2-dimensional type string to support emptying out the one-dimensional PSX disc select control
|
||||
}
|
||||
|
||||
public bool IsEmpty
|
||||
|
|
|
@ -292,7 +292,17 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (index == _floatEditRow && columnName == _floatEditColumn)
|
||||
text = _floatTypedValue;
|
||||
else if (index < CurrentTasMovie.InputLogLength)
|
||||
{
|
||||
text = CurrentTasMovie.DisplayValue(index, columnName);
|
||||
if (column.Type == InputRoll.RollColumn.InputType.Float)
|
||||
{
|
||||
// feos: this could be cashed, but I don't notice any slowdown this way either
|
||||
Emulation.Common.ControllerDefinition.FloatRange range = Global.MovieSession.MovieControllerAdapter.Type.FloatRanges
|
||||
[Global.MovieSession.MovieControllerAdapter.Type.FloatControls.IndexOf(columnName)];
|
||||
if (text == range.Mid.ToString())
|
||||
text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
@ -422,9 +422,23 @@ namespace BizHawk.Client.EmuHawk
|
|||
AddColumn(FrameColumnName, "Frame#", 68);
|
||||
|
||||
var columnNames = GenerateColumnNames();
|
||||
InputRoll.RollColumn.InputType type;
|
||||
int digits = 1;
|
||||
foreach (var kvp in columnNames)
|
||||
{
|
||||
AddColumn(kvp.Key, kvp.Value, (kvp.Value.Length * 6) + 14);
|
||||
if (Global.MovieSession.MovieControllerAdapter.Type.FloatControls.Contains(kvp.Key))
|
||||
{
|
||||
Emulation.Common.ControllerDefinition.FloatRange range = Global.MovieSession.MovieControllerAdapter.Type.FloatRanges
|
||||
[Global.MovieSession.MovieControllerAdapter.Type.FloatControls.IndexOf(kvp.Key)];
|
||||
type = InputRoll.RollColumn.InputType.Float;
|
||||
digits = Math.Max(kvp.Value.Length, range.MaxDigits());
|
||||
}
|
||||
else
|
||||
{
|
||||
type = InputRoll.RollColumn.InputType.Boolean;
|
||||
digits = kvp.Value.Length;
|
||||
}
|
||||
AddColumn(kvp.Key, kvp.Value, (digits * 6) + 14, type);
|
||||
}
|
||||
|
||||
var columnsToHide = TasView.AllColumns
|
||||
|
@ -478,7 +492,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
SetUpToolStripColumns();
|
||||
}
|
||||
|
||||
public void AddColumn(string columnName, string columnText, int columnWidth)
|
||||
public void AddColumn(string columnName, string columnText, int columnWidth, InputRoll.RollColumn.InputType columnType = InputRoll.RollColumn.InputType.Boolean)
|
||||
{
|
||||
if (TasView.AllColumns[columnName] == null)
|
||||
{
|
||||
|
@ -486,7 +500,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Name = columnName,
|
||||
Text = columnText,
|
||||
Width = columnWidth
|
||||
Width = columnWidth,
|
||||
Type = columnType
|
||||
};
|
||||
|
||||
TasView.AllColumns.Add(column);
|
||||
|
|
Loading…
Reference in New Issue