gui.drawRectangle now accepts 4 parameters (X, Y, Width and Height). Should implement Line Color and Background Color as parameters.

This commit is contained in:
rolanmen1 2012-04-16 20:04:43 +00:00
parent 48f65ac847
commit a4032aff51
1 changed files with 10 additions and 3 deletions

View File

@ -463,12 +463,19 @@ namespace BizHawk.MultiClient
/// <summary>
/// draws a random rectangle for testing purposes
/// </summary>
public void gui_drawRectangle()
public void gui_drawRectangle(object X, object Y, object width, object height)
{
var r = new Random((int)DateTime.Now.Ticks);
using (var g = luaSurface.GetGraphics())
{
g.DrawRectangle(System.Drawing.Pens.Black, new System.Drawing.Rectangle(r.Next(100), r.Next(100), 100, 100));
try
{
g.DrawRectangle(System.Drawing.Pens.Black, LuaInt(X), LuaInt(Y), LuaInt(width), LuaInt(height));
}
catch(Exception e)
{
// need to stop the script from here
return;
}
}
}