Fixed gui.drawBox. Now draws correctly when width is a negative value.

This commit is contained in:
pasky1382 2012-09-02 02:37:25 +00:00
parent 1f128aeda4
commit 02c447becb
1 changed files with 22 additions and 2 deletions

View File

@ -635,8 +635,28 @@ namespace BizHawk.MultiClient
{
int int_x = LuaInt(X);
int int_y = LuaInt(Y);
int int_width = Math.Abs(LuaInt(X) - LuaInt(X2));
int int_height = Math.Abs(LuaInt(Y) - LuaInt(Y2));
int int_width = LuaInt(X2);
int int_height = LuaInt(Y2);
if (int_x < int_width)
{
int_width = Math.Abs(int_x - int_width);
}
else
{
int_width = int_x - int_width;
int_x -= int_width;
}
if (int_y < int_height)
{
int_height = Math.Abs(int_y - int_height);
}
else
{
int_height = int_y - int_height;
int_y -= int_height;
}
using (var pen = GetPen(line))
{