Lua Functions list - make params look pretty, including strongly typed variables when possible
This commit is contained in:
parent
70feebf229
commit
853c82d111
|
@ -63,20 +63,9 @@ namespace BizHawk.Client.Common
|
||||||
"displayvsync",
|
"displayvsync",
|
||||||
"Sets the display vsync property of the emulator"
|
"Sets the display vsync property of the emulator"
|
||||||
)]
|
)]
|
||||||
public static void DisplayVsync(object boolean)
|
public static void DisplayVsync(bool enabled)
|
||||||
{
|
{
|
||||||
var temp = boolean.ToString();
|
Global.Config.VSyncThrottle = enabled;
|
||||||
if (!String.IsNullOrWhiteSpace(temp))
|
|
||||||
{
|
|
||||||
if (temp == "0" || temp.ToLower() == "false")
|
|
||||||
{
|
|
||||||
Global.Config.VSyncThrottle = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Global.Config.VSyncThrottle = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[LuaMethodAttributes(
|
[LuaMethodAttributes(
|
||||||
|
|
|
@ -83,17 +83,21 @@ namespace BizHawk.Client.Common
|
||||||
list.Append('(');
|
list.Append('(');
|
||||||
for (var i = 0; i < Parameters.Count; i++)
|
for (var i = 0; i < Parameters.Count; i++)
|
||||||
{
|
{
|
||||||
var param = Parameters[i]
|
var param =
|
||||||
.Replace("System", String.Empty)
|
Parameters[i].Replace("System", String.Empty)
|
||||||
.Replace("Object", String.Empty)
|
.Replace("Object", String.Empty)
|
||||||
.Replace(" ", String.Empty)
|
.Replace(" ", String.Empty)
|
||||||
.Replace(".", String.Empty)
|
.Replace(".", String.Empty)
|
||||||
.Replace("LuaInterface", String.Empty);
|
.Replace("LuaInterface", String.Empty)
|
||||||
|
.Replace("Boolean", "bool ")
|
||||||
|
.Replace("String", "string ")
|
||||||
|
.Replace("LuaTable", "table ")
|
||||||
|
.Replace("LuaFunction", "func ");
|
||||||
|
|
||||||
list.Append(param);
|
list.Append(param);
|
||||||
if (i < Parameters.Count - 1)
|
if (i < Parameters.Count - 1)
|
||||||
{
|
{
|
||||||
list.Append(',');
|
list.Append(", ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue