-TAStudio: Players' 2, 4, etc input columns have darkened bg colors.
-LagLog is now moved over to new savestate-anchored movies
This commit is contained in:
parent
a721596fb6
commit
f9cd2f4075
|
@ -151,6 +151,8 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
|
|||
// States: TODO
|
||||
|
||||
// Lag Log: TODO
|
||||
tas.TasLagLog.FromLagLog(old.TasLagLog);
|
||||
tas.TasLagLog.StartFromFrame(frame);
|
||||
|
||||
tas.HeaderEntries.Clear();
|
||||
foreach (var kvp in old.HeaderEntries)
|
||||
|
@ -162,13 +164,13 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
|
|||
tas.SyncSettingsJson = old.SyncSettingsJson;
|
||||
|
||||
tas.Comments.Clear();
|
||||
foreach (var comment in old.Comments)
|
||||
foreach (string comment in old.Comments)
|
||||
{
|
||||
tas.Comments.Add(comment);
|
||||
}
|
||||
|
||||
tas.Subtitles.Clear();
|
||||
foreach (var sub in old.Subtitles)
|
||||
foreach (Subtitle sub in old.Subtitles)
|
||||
{
|
||||
tas.Subtitles.Add(sub);
|
||||
}
|
||||
|
|
|
@ -180,5 +180,11 @@ namespace BizHawk.Client.Common
|
|||
LagLog = log.LagLog;
|
||||
WasLag = log.WasLag;
|
||||
}
|
||||
|
||||
public void StartFromFrame(int index)
|
||||
{
|
||||
LagLog.RemoveRange(0, index);
|
||||
WasLag.RemoveRange(0, index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1301,6 +1301,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
QueryItemBkColor(f + startIndex, columns[j], ref itemColor);
|
||||
if (itemColor == Color.White)
|
||||
itemColor = rowColor;
|
||||
else if (itemColor.A != 255)
|
||||
{
|
||||
float alpha = (float)itemColor.A / 255;
|
||||
itemColor = Color.FromArgb(rowColor.R - (int)((rowColor.R - itemColor.R) * alpha),
|
||||
rowColor.G - (int)((rowColor.G - itemColor.G) * alpha),
|
||||
rowColor.B - (int)((rowColor.B - itemColor.B) * alpha));
|
||||
}
|
||||
|
||||
if (itemColor != Color.White) // An easy optimization, don't draw unless the user specified something other than the default
|
||||
{
|
||||
|
@ -1332,6 +1339,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
QueryItemBkColor(f + startRow, columns[j], ref itemColor);
|
||||
if (itemColor == Color.White)
|
||||
itemColor = rowColor;
|
||||
else if (itemColor.A != 255)
|
||||
{
|
||||
float alpha = (float)itemColor.A / 255;
|
||||
itemColor = Color.FromArgb(rowColor.R - (int)((rowColor.R - itemColor.R) * alpha),
|
||||
rowColor.G - (int)((rowColor.G - itemColor.G) * alpha),
|
||||
rowColor.B - (int)((rowColor.B - itemColor.B) * alpha));
|
||||
}
|
||||
|
||||
if (itemColor != Color.White) // An easy optimization, don't draw unless the user specified something other than the default
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public partial class TAStudio
|
||||
{
|
||||
// Everything here is currently for Lua
|
||||
public Func<int, string, Color?> QueryItemBgColorCallback { get; set; }
|
||||
public Func<int, string, string> QueryItemTextCallback { get; set; }
|
||||
public Func<int, string, Bitmap> QueryItemIconCallback { get; set; }
|
||||
|
|
|
@ -123,7 +123,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void TasView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
|
||||
{
|
||||
var overrideColor = GetColorOverride(index, column);
|
||||
Color? overrideColor = GetColorOverride(index, column);
|
||||
|
||||
if (overrideColor.HasValue)
|
||||
{
|
||||
|
@ -151,6 +151,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
{ // SuuperW: Analog editing is indicated by a color change.
|
||||
color = AnalogEdit_Col;
|
||||
}
|
||||
|
||||
int player = Global.Emulator.ControllerDefinition.PlayerNumber(columnName);
|
||||
if (player != 0 && player % 2 == 0)
|
||||
color = Color.FromArgb(32, 0, 0, 0);
|
||||
}
|
||||
private void TasView_QueryRowBkColor(int index, ref Color color)
|
||||
{
|
||||
|
|
|
@ -120,17 +120,20 @@ namespace BizHawk.Emulation.Common
|
|||
ret[i] = new List<string>();
|
||||
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
int player = 0;
|
||||
if (list[i].Length > 3 && list[i].StartsWith("P") && char.IsNumber(list[i][1]))
|
||||
player = int.Parse(list[i][1].ToString());
|
||||
ret[player].Add(list[i]);
|
||||
}
|
||||
ret[PlayerNumber(list[i])].Add(list[i]);
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public int PlayerNumber(string buttonName)
|
||||
{
|
||||
int player = 0;
|
||||
if (buttonName.Length > 3 && buttonName.StartsWith("P") && char.IsNumber(buttonName[1]))
|
||||
player = buttonName[1] - '0';
|
||||
return player;
|
||||
}
|
||||
|
||||
// TODO: a more respectable logic here, and possibly per core implementation
|
||||
public virtual int PlayerCount
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue