LuaConsole: Call UpdateNumberOfScripts after you delete a script.
LuaImplementation: Added emu.ispaused(), also added the parameters width and height to forms.label and forms.button
This commit is contained in:
parent
8f22c9098b
commit
6cec0f0182
|
@ -281,6 +281,7 @@ namespace BizHawk.MultiClient
|
|||
"pause",
|
||||
"unpause",
|
||||
"togglepause",
|
||||
"ispaused",
|
||||
"speedmode",
|
||||
"framecount",
|
||||
"lagcount",
|
||||
|
@ -809,6 +810,11 @@ namespace BizHawk.MultiClient
|
|||
Global.MainForm.TogglePause();
|
||||
}
|
||||
|
||||
public bool emu_ispaused()
|
||||
{
|
||||
return Global.MainForm.EmulatorPaused;
|
||||
}
|
||||
|
||||
public int emu_framecount()
|
||||
{
|
||||
return Global.Emulator.Frame;
|
||||
|
@ -1796,7 +1802,9 @@ namespace BizHawk.MultiClient
|
|||
Global.MainForm.LoadCheatsWindow();
|
||||
}
|
||||
|
||||
//Winforms
|
||||
//----------------------------------------------------
|
||||
//Winforms library
|
||||
//----------------------------------------------------
|
||||
public List<LuaWinform> LuaForms = new List<LuaWinform>();
|
||||
|
||||
public int forms_newform(object Width = null, object Height = null, object title = null)
|
||||
|
@ -1909,7 +1917,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
public int forms_button(object form_handle, object caption, LuaFunction lua_event, object X = null, object Y = null)
|
||||
public int forms_button(object form_handle, object caption, LuaFunction lua_event, object X = null, object Y = null, object width = null, object height = null)
|
||||
{
|
||||
LuaWinform form = GetForm(form_handle);
|
||||
if (form == null)
|
||||
|
@ -1921,11 +1929,17 @@ namespace BizHawk.MultiClient
|
|||
SetText(button, caption);
|
||||
form.Controls.Add(button);
|
||||
form.Control_Events.Add(new LuaWinform.Lua_Event(button.Handle, lua_event));
|
||||
SetLocation(button, X, Y);
|
||||
|
||||
if (X != null && Y != null)
|
||||
SetLocation(button, X, Y);
|
||||
|
||||
if (width != null & height != null)
|
||||
SetSize(button, width, height);
|
||||
|
||||
return (int)button.Handle;
|
||||
}
|
||||
|
||||
public int forms_label(object form_handle, object caption, object X = null, object Y = null)
|
||||
public int forms_label(object form_handle, object caption, object X = null, object Y = null, object width = null, object height = null)
|
||||
{
|
||||
LuaWinform form = GetForm(form_handle);
|
||||
if (form == null)
|
||||
|
@ -1936,7 +1950,12 @@ namespace BizHawk.MultiClient
|
|||
Label label = new Label();
|
||||
SetText(label, caption);
|
||||
form.Controls.Add(label);
|
||||
SetLocation(label, X, Y);
|
||||
if (X != null && Y != null)
|
||||
SetLocation(label, X, Y);
|
||||
|
||||
if (width != null & height != null)
|
||||
SetSize(label, width, height);
|
||||
|
||||
return (int)label.Handle;
|
||||
}
|
||||
|
||||
|
|
|
@ -342,7 +342,7 @@
|
|||
this.newScriptToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.NewFile;
|
||||
this.newScriptToolStripMenuItem.Name = "newScriptToolStripMenuItem";
|
||||
this.newScriptToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
|
||||
this.newScriptToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.newScriptToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||
this.newScriptToolStripMenuItem.Text = "New Script";
|
||||
this.newScriptToolStripMenuItem.Click += new System.EventHandler(this.newScriptToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -351,7 +351,7 @@
|
|||
this.openToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.OpenFile;
|
||||
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
||||
this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
||||
this.openToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.openToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||
this.openToolStripMenuItem.Text = "&Open Script...";
|
||||
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click_1);
|
||||
//
|
||||
|
@ -360,7 +360,7 @@
|
|||
this.toggleToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Refresh1;
|
||||
this.toggleToolStripMenuItem.Name = "toggleToolStripMenuItem";
|
||||
this.toggleToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.T)));
|
||||
this.toggleToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.toggleToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||
this.toggleToolStripMenuItem.Text = "&Toggle";
|
||||
this.toggleToolStripMenuItem.Click += new System.EventHandler(this.toggleToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -368,7 +368,7 @@
|
|||
//
|
||||
this.pauseResumeToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Pause;
|
||||
this.pauseResumeToolStripMenuItem.Name = "pauseResumeToolStripMenuItem";
|
||||
this.pauseResumeToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.pauseResumeToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||
this.pauseResumeToolStripMenuItem.Text = "Pause or Resume";
|
||||
this.pauseResumeToolStripMenuItem.Click += new System.EventHandler(this.pauseResumeToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -377,7 +377,7 @@
|
|||
this.editToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.CutHS;
|
||||
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||
this.editToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E)));
|
||||
this.editToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.editToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||
this.editToolStripMenuItem.Text = "&Edit Script";
|
||||
this.editToolStripMenuItem.Click += new System.EventHandler(this.editToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -386,8 +386,8 @@
|
|||
this.removeScriptToolStripMenuItem1.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
|
||||
this.removeScriptToolStripMenuItem1.Name = "removeScriptToolStripMenuItem1";
|
||||
this.removeScriptToolStripMenuItem1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R)));
|
||||
this.removeScriptToolStripMenuItem1.Size = new System.Drawing.Size(195, 22);
|
||||
this.removeScriptToolStripMenuItem1.Text = "&Remove Watch";
|
||||
this.removeScriptToolStripMenuItem1.Size = new System.Drawing.Size(193, 22);
|
||||
this.removeScriptToolStripMenuItem1.Text = "&Remove Script";
|
||||
this.removeScriptToolStripMenuItem1.Click += new System.EventHandler(this.removeScriptToolStripMenuItem_Click);
|
||||
//
|
||||
// insertSeparatorToolStripMenuItem
|
||||
|
@ -395,21 +395,21 @@
|
|||
this.insertSeparatorToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.InsertSeparator;
|
||||
this.insertSeparatorToolStripMenuItem.Name = "insertSeparatorToolStripMenuItem";
|
||||
this.insertSeparatorToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
|
||||
this.insertSeparatorToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.insertSeparatorToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||
this.insertSeparatorToolStripMenuItem.Text = "Insert Separator";
|
||||
this.insertSeparatorToolStripMenuItem.Click += new System.EventHandler(this.insertSeperatorToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator7
|
||||
//
|
||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||
this.toolStripSeparator7.Size = new System.Drawing.Size(192, 6);
|
||||
this.toolStripSeparator7.Size = new System.Drawing.Size(190, 6);
|
||||
//
|
||||
// moveUpToolStripMenuItem
|
||||
//
|
||||
this.moveUpToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.MoveUp;
|
||||
this.moveUpToolStripMenuItem.Name = "moveUpToolStripMenuItem";
|
||||
this.moveUpToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U)));
|
||||
this.moveUpToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.moveUpToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||
this.moveUpToolStripMenuItem.Text = "Move &Up";
|
||||
this.moveUpToolStripMenuItem.Click += new System.EventHandler(this.moveUpToolStripMenuItem_Click_1);
|
||||
//
|
||||
|
@ -418,7 +418,7 @@
|
|||
this.moveDownToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.MoveDown;
|
||||
this.moveDownToolStripMenuItem.Name = "moveDownToolStripMenuItem";
|
||||
this.moveDownToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));
|
||||
this.moveDownToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.moveDownToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||
this.moveDownToolStripMenuItem.Text = "Move &Down";
|
||||
this.moveDownToolStripMenuItem.Click += new System.EventHandler(this.moveDownToolStripMenuItem_Click_1);
|
||||
//
|
||||
|
@ -426,20 +426,20 @@
|
|||
//
|
||||
this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
|
||||
this.selectAllToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));
|
||||
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||
this.selectAllToolStripMenuItem.Text = "Select &All";
|
||||
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator6
|
||||
//
|
||||
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
||||
this.toolStripSeparator6.Size = new System.Drawing.Size(192, 6);
|
||||
this.toolStripSeparator6.Size = new System.Drawing.Size(190, 6);
|
||||
//
|
||||
// turnOffAllScriptsToolStripMenuItem
|
||||
//
|
||||
this.turnOffAllScriptsToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Stop;
|
||||
this.turnOffAllScriptsToolStripMenuItem.Name = "turnOffAllScriptsToolStripMenuItem";
|
||||
this.turnOffAllScriptsToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.turnOffAllScriptsToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
|
||||
this.turnOffAllScriptsToolStripMenuItem.Text = "Turn Off All Scripts";
|
||||
this.turnOffAllScriptsToolStripMenuItem.Click += new System.EventHandler(this.turnOffAllScriptsToolStripMenuItem_Click);
|
||||
//
|
||||
|
|
|
@ -436,6 +436,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
indexes.Clear();
|
||||
DisplayLuaList();
|
||||
UpdateNumberOfScripts();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -133,17 +133,18 @@
|
|||
<data name="openToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJQSURBVDhPlZNdSNNRGMb/F110ZZEVhVBgeeHNICiiuggp
|
||||
olAUyyxI0oSaH1QYC3N+tKnp5ubm1JUua5uuqdPKMgr7kApFItTUkWZqVhSVYmao5Nev/xyoQ4k88Nyc
|
||||
8z6/93nP4QjCfy6lwc4ltZVso4P/tMyXRcmMHq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34uYNwWR9nVTEoL0zHlp2DMSeaSRk6eKt4VWm5WM/rVPNN5SjDTLQebZEHNA1wr
|
||||
UvHjk3E6tsNcV62e1r3KLGqtKm6WplNpSsVqVFJsOM8VfSKFWjkGtcyZptSYzvC7XByx3zQoqCnTMvlG
|
||||
CX1prnornPUmQJcUXsbSVhGK5bIOkcmQyveeTHiv4VZ5Nk33Nc6iuSO8CIfmECYa/bE/8ON1iRipJNh5
|
||||
F0V6Bd86lfQ1JlFj1TDVq4COKCegLVIwHmGiKRB7/V6G7+5koHozymgfYRy5E1CgTWKgXcZ1i5qWp0KS
|
||||
rjgBcAJawph6FszYk/2M1O1isGYLX8p9ab6wgqP+3rMvYciS01GfzA1LFvQkQ6sQ9/khxhoCGHnox1Dt
|
||||
NvorxXw0b8Km8UQh2cip6GOzgNyMeKqKM7HdjqFZJ5pRk2YJ9aql3EnxoCJxNaZ4Ly6e3UDY3O6OEXRp
|
||||
59ApTpIhiyDh9GHORAZyPHQPB/ZtZ/cOMVvFPvh6e7F+3SrWrHRnraf7Xz/xf/rJ/kvxb84I3U1y+9/W
|
||||
AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
|
|
Loading…
Reference in New Issue