Lua - implement client.screenwidth() and client.screenheight()

This commit is contained in:
adelikat 2012-09-02 16:49:58 +00:00
parent df440e97ec
commit 16bc441231
1 changed files with 12 additions and 0 deletions

View File

@ -476,6 +476,8 @@ namespace BizHawk.MultiClient
"openhexeditor", "openhexeditor",
"opentasstudio", "opentasstudio",
"opencheats", "opencheats",
"screenwidth",
"screenheight",
}; };
public static string[] FormsFunctions = new string[] public static string[] FormsFunctions = new string[]
@ -1914,6 +1916,16 @@ namespace BizHawk.MultiClient
//---------------------------------------------------- //----------------------------------------------------
//Client library //Client library
//---------------------------------------------------- //----------------------------------------------------
public int client_screenwidth()
{
return Global.RenderPanel.NativeSize.Width;
}
public int client_screenheight()
{
return Global.RenderPanel.NativeSize.Height;
}
public void client_openrom(object lua_input) public void client_openrom(object lua_input)
{ {
Global.MainForm.LoadRom(lua_input.ToString()); Global.MainForm.LoadRom(lua_input.ToString());