Lua - gui.drawpixel - make color optional (and default to black if not specified)

This commit is contained in:
adelikat 2012-06-13 01:09:21 +00:00
parent f7d66d4924
commit c22ba4da32
1 changed files with 3 additions and 1 deletions

View File

@ -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())
{
float x = LuaInt(X) + 0.1F;
try
{
if (color == null)
color = "black";
using(var pen = GetPen(color))
g.DrawLine(pen, LuaInt(X), LuaInt(Y), x, LuaInt(Y));
}