Pass log callback through to `LuaPictureBox`
This commit is contained in:
parent
b51bb85c82
commit
f6cb86fa65
|
@ -305,7 +305,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LuaPictureBox pictureBox = new(_th);
|
LuaPictureBox pictureBox = new(_th, LogOutputCallback);
|
||||||
form.Controls.Add(pictureBox);
|
form.Controls.Add(pictureBox);
|
||||||
const string FUNC_NAME = "forms.pictureBox";
|
const string FUNC_NAME = "forms.pictureBox";
|
||||||
ProcessPositionArguments(x: x, y: y, pictureBox, functionName: FUNC_NAME);
|
ProcessPositionArguments(x: x, y: y, pictureBox, functionName: FUNC_NAME);
|
||||||
|
|
|
@ -56,7 +56,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
luaPictureBox = new(_th)
|
luaPictureBox = new(_th, LogOutputCallback)
|
||||||
{
|
{
|
||||||
Image = Properties.Resources.LuaPictureBox,
|
Image = Properties.Resources.LuaPictureBox,
|
||||||
Location = new Point(0, 0),
|
Location = new Point(0, 0),
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private readonly Dictionary<Color, SolidBrush> _solidBrushes = new Dictionary<Color, SolidBrush>();
|
private readonly Dictionary<Color, SolidBrush> _solidBrushes = new Dictionary<Color, SolidBrush>();
|
||||||
private readonly Dictionary<Color, Pen> _pens = new Dictionary<Color, Pen>();
|
private readonly Dictionary<Color, Pen> _pens = new Dictionary<Color, Pen>();
|
||||||
|
|
||||||
|
private readonly Action<string> LogOutputCallback;
|
||||||
|
|
||||||
private readonly NLuaTableHelper TableHelper;
|
private readonly NLuaTableHelper TableHelper;
|
||||||
|
|
||||||
private SolidBrush GetBrush([LuaColorParam] object color)
|
private SolidBrush GetBrush([LuaColorParam] object color)
|
||||||
|
@ -29,9 +31,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private Color? _defaultBackground;
|
private Color? _defaultBackground;
|
||||||
private Color? _defaultTextBackground = Color.FromArgb(128, 0, 0, 0);
|
private Color? _defaultTextBackground = Color.FromArgb(128, 0, 0, 0);
|
||||||
|
|
||||||
public LuaPictureBox(NLuaTableHelper tableHelper)
|
public LuaPictureBox(NLuaTableHelper tableHelper, Action<string> logOutputCallback)
|
||||||
{
|
{
|
||||||
Image = new Bitmap(Width, Height);
|
Image = new Bitmap(Width, Height);
|
||||||
|
LogOutputCallback = logOutputCallback;
|
||||||
TableHelper = tableHelper;
|
TableHelper = tableHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue