LuaCanvas: Add SetLocation function

Allows the user to reset the location of the canvas window at will while a script is running
This commit is contained in:
Trivial-Man 2017-06-29 20:16:02 -06:00 committed by GitHub
parent 22200171e7
commit 8a2056193d
1 changed files with 10 additions and 0 deletions

View File

@ -38,6 +38,16 @@ namespace BizHawk.Client.EmuHawk
Text = title;
}
[LuaMethodAttributes(
"SetLocation",
"Sets the location of the canvas window")]
public void SetLocation(int x, int y)
{
StartPosition = System.Windows.Forms.FormStartPosition.Manual;
Left = (int)x;
Top = (int)y;
}
[LuaMethodAttributes(
"Clear",
"Clears the canvas")]