diff --git a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Gui.cs b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Gui.cs index adf906bf22..665e16b0f9 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Gui.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Gui.cs @@ -450,7 +450,7 @@ namespace BizHawk.Client.EmuHawk [LuaMethodExample("gui.drawPolygon( { { 5, 10 }, { 10, 10 }, { 10, 20 }, { 5, 20 } }, 10, 30, 0x007F00FF, 0x7F7F7FFF );")] [LuaMethod("drawPolygon", "Draws a polygon using the table of coordinates specified in points. This should be a table of tables(each of size 2). If x or y is passed, the polygon will be translated by the passed coordinate pair. Line is the color of the polygon. Background is the optional fill color")] - public void DrawPolygon(LuaTable points, int? x = null, int? y = null, Color? line = null, Color? background = null) + public void DrawPolygon(LuaTable points, int? offsetX = null, int? offsetY = null, Color? line = null, Color? background = null) { using (var g = GetGraphics()) { @@ -460,7 +460,7 @@ namespace BizHawk.Client.EmuHawk var i = 0; foreach (LuaTable point in points.Values) { - pointsArr[i] = new Point(LuaInt(point[1]) + x ?? 0, LuaInt(point[2]) + y ?? 0); + pointsArr[i] = new Point(LuaInt(point[1]) + (offsetX ?? 0), LuaInt(point[2]) + (offsetY ?? 0)); i++; }