Lua - gui.drawpixel - make color optional (and default to black if not specified)
This commit is contained in:
parent
f7d66d4924
commit
c22ba4da32
|
@ -533,13 +533,15 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void gui_drawPixel(object X, object Y, object color)
|
public void gui_drawPixel(object X, object Y, object color = null)
|
||||||
{
|
{
|
||||||
using (var g = luaSurface.GetGraphics())
|
using (var g = luaSurface.GetGraphics())
|
||||||
{
|
{
|
||||||
float x = LuaInt(X) + 0.1F;
|
float x = LuaInt(X) + 0.1F;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (color == null)
|
||||||
|
color = "black";
|
||||||
using(var pen = GetPen(color))
|
using(var pen = GetPen(color))
|
||||||
g.DrawLine(pen, LuaInt(X), LuaInt(Y), x, LuaInt(Y));
|
g.DrawLine(pen, LuaInt(X), LuaInt(Y), x, LuaInt(Y));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue