Remove bmp images in favor of png, small implementations to Lua Console

This commit is contained in:
andres.delikat 2011-06-26 02:09:06 +00:00
parent 58a0a77ae5
commit 3569f3cd0a
14 changed files with 235 additions and 186 deletions

View File

@ -557,6 +557,10 @@
<None Include="images\CopyFolderHS.png" />
<None Include="images\MessageConfig.png" />
<None Include="images\AudioHS.png" />
<None Include="images\Delete.png" />
<None Include="images\MoveDown.png" />
<None Include="images\MoveUp.png" />
<None Include="images\InsertSeparator.png" />
<Content Include="output\gamedb.txt" />
<Content Include="output\gamedb_neshomebrew.txt" />
<None Include="images\Refresh.bmp" />

View File

@ -8,110 +8,110 @@ using BizHawk.MultiClient.tools;
namespace BizHawk.MultiClient
{
class LuaImplementation
{
Lua lua = new Lua();
LuaConsole Caller;
public static string[] EmuFunctions = new string[] {
"frameadvance",
"pause",
"unpause",
"speedmode",
"framecount",
"lagcount",
"islagged",
"registerbefore",
"registerafter",
"register"
};
public static string[] MemoryFunctions = new string[] {
"readbyte",
"readbytesigned",
"readword",
"readwordsigned",
"readdword",
"readdwordsigned",
"readbyterange",
"writebyte",
"writeword",
"writedword",
"registerwrite",
"registerread",
};
public static string[] SaveStateFunctions = new string[] {
"create",
"save",
"load",
"write"
};
public static string[] MovieFunctions = new string[] {
"mode",
"rerecordcount",
"stop"
};
public static string[] JoypadFunctions = new string[] {
"set",
"get",
};
public LuaImplementation(LuaConsole passed)
{
Caller = passed.get();
lua.RegisterFunction("print",this, this.GetType().GetMethod("print"));
class LuaImplementation
{
Lua lua = new Lua();
LuaConsole Caller;
public static string[] EmuFunctions = new string[] {
"frameadvance",
"pause",
"unpause",
"speedmode",
"framecount",
"lagcount",
"islagged",
"registerbefore",
"registerafter",
"register"
};
public static string[] MemoryFunctions = new string[] {
"readbyte",
//"readbytesigned",
//"readword",
//"readwordsigned",
//"readdword",
//"readdwordsigned",
//"readbyterange",
//"writebyte",
//"writeword",
//"writedword",
//"registerwrite",
//"registerread",
};
public static string[] SaveStateFunctions = new string[] {
"create",
"save",
"load",
"write"
};
public static string[] MovieFunctions = new string[] {
"mode",
"rerecordcount",
"stop"
};
public static string[] JoypadFunctions = new string[] {
"set",
//"get",
};
public LuaImplementation(LuaConsole passed)
{
Caller = passed.get();
lua.RegisterFunction("print", this, this.GetType().GetMethod("print"));
lua.NewTable("memory");
for (int i = 0; i < MemoryFunctions.Length; i++)
{
lua.RegisterFunction("memory." + MemoryFunctions[i], this, this.GetType().GetMethod("memory_"+MemoryFunctions[i]));
{
lua.RegisterFunction("memory." + MemoryFunctions[i], this, this.GetType().GetMethod("memory_" + MemoryFunctions[i]));
}
lua.NewTable("joypad");
for (int i = 0; i < JoypadFunctions.Length; i++)
{
lua.RegisterFunction("joypad." + MemoryFunctions[i], this, this.GetType().GetMethod("joypad_"+JoypadFunctions[i]));
}
}
lua.NewTable("joypad");
for (int i = 0; i < JoypadFunctions.Length; i++)
{
lua.RegisterFunction("joypad." + MemoryFunctions[i], this, this.GetType().GetMethod("joypad_" + JoypadFunctions[i]));
}
}
public void DoLuaFile(string File)
{
}
public void print(string s)
{
Caller.AddText(string.Format(s));
}
public string memory_readbyte(object lua_input)
{
byte x;
if (lua_input.GetType() == typeof(string))
{
x = Global.Emulator.MainMemory.PeekByte(int.Parse((string)lua_input));
return x.ToString();
}
else
{
double y = (double)lua_input;
x = Global.Emulator.MainMemory.PeekByte(Convert.ToInt32(y));
return x.ToString();
}
}
public void memory_writebyte(object lua_input)
{
Global.Emulator.MainMemory.PokeByte((int)lua_input, (byte)lua_input);
}
public void joypad_get(object lua_input)
{
public void DoLuaFile(string File)
{
}
public void joypad_set(object lua_input)
{
}
public void print(string s)
{
Caller.AddText(string.Format(s));
}
public string memory_readbyte(object lua_input)
{
}
public string movie_rerecordcount()
{
return "No";
}
public void movie_stop()
{
}
}
byte x;
if (lua_input.GetType() == typeof(string))
{
x = Global.Emulator.MainMemory.PeekByte(int.Parse((string)lua_input));
return x.ToString();
}
else
{
double y = (double)lua_input;
x = Global.Emulator.MainMemory.PeekByte(Convert.ToInt32(y));
return x.ToString();
}
}
public void memory_writebyte(object lua_input)
{
Global.Emulator.MainMemory.PokeByte((int)lua_input, (byte)lua_input);
}
public void joypad_get(object lua_input)
{
}
public void joypad_set(object lua_input)
{
}
public string movie_rerecordcount()
{
return "No";
}
public void movie_stop()
{
}
}
}

View File

@ -266,7 +266,7 @@
//
this.openROMToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.OpenFile;
this.openROMToolStripMenuItem.Name = "openROMToolStripMenuItem";
this.openROMToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.openROMToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.openROMToolStripMenuItem.Text = "Open ROM";
this.openROMToolStripMenuItem.Click += new System.EventHandler(this.openROMToolStripMenuItem_Click);
//
@ -278,7 +278,7 @@
this.clearToolStripMenuItem,
this.autoloadMostRecentToolStripMenuItem});
this.recentROMToolStripMenuItem.Name = "recentROMToolStripMenuItem";
this.recentROMToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.recentROMToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.recentROMToolStripMenuItem.Text = "Recent ROM";
this.recentROMToolStripMenuItem.DropDownOpened += new System.EventHandler(this.recentROMToolStripMenuItem_DropDownOpened);
//
@ -311,14 +311,14 @@
//
this.closeROMToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Close;
this.closeROMToolStripMenuItem.Name = "closeROMToolStripMenuItem";
this.closeROMToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.closeROMToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.closeROMToolStripMenuItem.Text = "&Close ROM";
this.closeROMToolStripMenuItem.Click += new System.EventHandler(this.closeROMToolStripMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(142, 6);
this.toolStripMenuItem1.Size = new System.Drawing.Size(149, 6);
//
// saveStateToolStripMenuItem
//
@ -336,7 +336,7 @@
this.toolStripSeparator6,
this.saveNamedStateToolStripMenuItem});
this.saveStateToolStripMenuItem.Name = "saveStateToolStripMenuItem";
this.saveStateToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.saveStateToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.saveStateToolStripMenuItem.Text = "Save State";
this.saveStateToolStripMenuItem.DropDownOpened += new System.EventHandler(this.saveStateToolStripMenuItem_DropDownOpened);
//
@ -438,7 +438,7 @@
this.toolStripSeparator7,
this.loadNamedStateToolStripMenuItem});
this.loadStateToolStripMenuItem.Name = "loadStateToolStripMenuItem";
this.loadStateToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.loadStateToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.loadStateToolStripMenuItem.Text = "Load State";
this.loadStateToolStripMenuItem.DropDownOpened += new System.EventHandler(this.loadStateToolStripMenuItem_DropDownOpened);
//
@ -543,7 +543,7 @@
this.saveToCurrentSlotToolStripMenuItem,
this.loadCurrentSlotToolStripMenuItem});
this.saveSlotToolStripMenuItem.Name = "saveSlotToolStripMenuItem";
this.saveSlotToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.saveSlotToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.saveSlotToolStripMenuItem.Text = "SaveSlot";
this.saveSlotToolStripMenuItem.DropDownOpened += new System.EventHandler(this.saveSlotToolStripMenuItem_DropDownOpened);
//
@ -653,7 +653,7 @@
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(142, 6);
this.toolStripMenuItem2.Size = new System.Drawing.Size(149, 6);
//
// movieToolStripMenuItem
//
@ -669,7 +669,7 @@
this.bindSavestatesToMoviesToolStripMenuItem,
this.automaticallyBackupMoviesToolStripMenuItem});
this.movieToolStripMenuItem.Name = "movieToolStripMenuItem";
this.movieToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.movieToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.movieToolStripMenuItem.Text = "Movie";
this.movieToolStripMenuItem.DropDownOpened += new System.EventHandler(this.movieToolStripMenuItem_DropDownOpened);
//
@ -775,7 +775,7 @@
this.screenshotF12ToolStripMenuItem,
this.screenshotAsToolStripMenuItem});
this.screenshotToolStripMenuItem.Name = "screenshotToolStripMenuItem";
this.screenshotToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.screenshotToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.screenshotToolStripMenuItem.Text = "Screenshot";
//
// screenshotF12ToolStripMenuItem
@ -795,13 +795,13 @@
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(142, 6);
this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
this.exitToolStripMenuItem.Size = new System.Drawing.Size(145, 22);
this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
@ -1499,6 +1499,7 @@
//
// keypadToolStripMenuItem
//
this.keypadToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.calculator;
this.keypadToolStripMenuItem.Name = "keypadToolStripMenuItem";
this.keypadToolStripMenuItem.Size = new System.Drawing.Size(230, 22);
this.keypadToolStripMenuItem.Text = "Keypad";
@ -1540,14 +1541,14 @@
//
this.helpToolStripMenuItem1.Enabled = false;
this.helpToolStripMenuItem1.Name = "helpToolStripMenuItem1";
this.helpToolStripMenuItem1.Size = new System.Drawing.Size(114, 22);
this.helpToolStripMenuItem1.Size = new System.Drawing.Size(152, 22);
this.helpToolStripMenuItem1.Text = "&Help";
this.helpToolStripMenuItem1.Click += new System.EventHandler(this.helpToolStripMenuItem1_Click);
//
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.aboutToolStripMenuItem.Text = "&About";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//

View File

@ -95,27 +95,6 @@ namespace BizHawk.MultiClient.Properties {
}
}
internal static System.Drawing.Bitmap BuilderDialog_delete {
get {
object obj = ResourceManager.GetObject("BuilderDialog_delete", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap BuilderDialog_movedown {
get {
object obj = ResourceManager.GetObject("BuilderDialog_movedown", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap BuilderDialog_moveup {
get {
object obj = ResourceManager.GetObject("BuilderDialog_moveup", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap calculator {
get {
object obj = ResourceManager.GetObject("calculator", resourceCulture);
@ -165,6 +144,13 @@ namespace BizHawk.MultiClient.Properties {
}
}
internal static System.Drawing.Bitmap Delete {
get {
object obj = ResourceManager.GetObject("Delete", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Duplicate {
get {
object obj = ResourceManager.GetObject("Duplicate", resourceCulture);
@ -228,9 +214,9 @@ namespace BizHawk.MultiClient.Properties {
}
}
internal static System.Drawing.Bitmap InserSeparator {
internal static System.Drawing.Bitmap InsertSeparator {
get {
object obj = ResourceManager.GetObject("InserSeparator", resourceCulture);
object obj = ResourceManager.GetObject("InsertSeparator", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
@ -256,6 +242,20 @@ namespace BizHawk.MultiClient.Properties {
}
}
internal static System.Drawing.Bitmap MoveDown {
get {
object obj = ResourceManager.GetObject("MoveDown", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap MoveUp {
get {
object obj = ResourceManager.GetObject("MoveUp", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap NESController {
get {
object obj = ResourceManager.GetObject("NESController", resourceCulture);

View File

@ -118,15 +118,6 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="BuilderDialog_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\BuilderDialog_delete.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="BuilderDialog_movedown" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\BuilderDialog_movedown.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="BuilderDialog_moveup" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\BuilderDialog_moveup.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="FindHS" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\FindHS.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -139,9 +130,6 @@
<data name="NESController" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\config\ControllerImages\NESController.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="InserSeparator" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\InserSeparator.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PCEngineController" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\config\ControllerImages\PCEngineController.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -729,7 +717,19 @@
<data name="CopyFolderHS" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\CopyFolderHS.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\Delete.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="InsertSeparator" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\InsertSeparator.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MessageConfig" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\MessageConfig.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MoveDown" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\MoveDown.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MoveUp" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\MoveUp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -242,7 +242,7 @@
//
// removeCheatToolStripMenuItem
//
this.removeCheatToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_delete;
this.removeCheatToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
this.removeCheatToolStripMenuItem.Name = "removeCheatToolStripMenuItem";
this.removeCheatToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R)));
this.removeCheatToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
@ -260,7 +260,7 @@
//
// insertSeparatorToolStripMenuItem
//
this.insertSeparatorToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.InserSeparator;
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(201, 22);
@ -274,7 +274,7 @@
//
// moveUpToolStripMenuItem
//
this.moveUpToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_moveup;
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(201, 22);
@ -283,7 +283,7 @@
//
// moveDownToolStripMenuItem
//
this.moveDownToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_movedown;
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(201, 22);
@ -422,7 +422,7 @@
// cutToolStripButton
//
this.cutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.cutToolStripButton.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_delete;
this.cutToolStripButton.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.cutToolStripButton.Name = "cutToolStripButton";
this.cutToolStripButton.Size = new System.Drawing.Size(23, 22);
@ -442,7 +442,7 @@
// toolStripButtonSeparator
//
this.toolStripButtonSeparator.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonSeparator.Image = global::BizHawk.MultiClient.Properties.Resources.InserSeparator;
this.toolStripButtonSeparator.Image = global::BizHawk.MultiClient.Properties.Resources.InsertSeparator;
this.toolStripButtonSeparator.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonSeparator.Name = "toolStripButtonSeparator";
this.toolStripButtonSeparator.Size = new System.Drawing.Size(23, 22);
@ -457,7 +457,7 @@
// toolStripButtonMoveUp
//
this.toolStripButtonMoveUp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonMoveUp.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_moveup;
this.toolStripButtonMoveUp.Image = global::BizHawk.MultiClient.Properties.Resources.MoveUp;
this.toolStripButtonMoveUp.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonMoveUp.Name = "toolStripButtonMoveUp";
this.toolStripButtonMoveUp.Size = new System.Drawing.Size(23, 22);
@ -467,7 +467,7 @@
// toolStripButtonMoveDown
//
this.toolStripButtonMoveDown.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonMoveDown.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_movedown;
this.toolStripButtonMoveDown.Image = global::BizHawk.MultiClient.Properties.Resources.MoveDown;
this.toolStripButtonMoveDown.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonMoveDown.Name = "toolStripButtonMoveDown";
this.toolStripButtonMoveDown.Size = new System.Drawing.Size(23, 22);
@ -704,7 +704,7 @@
//
// removeSelectedToolStripMenuItem
//
this.removeSelectedToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_delete;
this.removeSelectedToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
this.removeSelectedToolStripMenuItem.Name = "removeSelectedToolStripMenuItem";
this.removeSelectedToolStripMenuItem.Size = new System.Drawing.Size(170, 22);
this.removeSelectedToolStripMenuItem.Text = "Remove Selected";

View File

@ -63,8 +63,10 @@
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.NumberOfScripts = new System.Windows.Forms.Label();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.stopAllScriptsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// LuaListView
@ -135,6 +137,7 @@
this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
this.newToolStripMenuItem.Size = new System.Drawing.Size(204, 22);
this.newToolStripMenuItem.Text = "&New";
this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
//
// openToolStripMenuItem
//
@ -227,7 +230,7 @@
//
// insertSeparatorToolStripMenuItem
//
this.insertSeparatorToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.InserSeparator;
this.insertSeparatorToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.InsertSeparator;
this.insertSeparatorToolStripMenuItem.Name = "insertSeparatorToolStripMenuItem";
this.insertSeparatorToolStripMenuItem.Size = new System.Drawing.Size(175, 22);
this.insertSeparatorToolStripMenuItem.Text = "Insert Separator";
@ -238,6 +241,7 @@
this.turnOffAllScriptsToolStripMenuItem.Name = "turnOffAllScriptsToolStripMenuItem";
this.turnOffAllScriptsToolStripMenuItem.Size = new System.Drawing.Size(175, 22);
this.turnOffAllScriptsToolStripMenuItem.Text = "Turn Off All Scripts";
this.turnOffAllScriptsToolStripMenuItem.Click += new System.EventHandler(this.turnOffAllScriptsToolStripMenuItem_Click);
//
// viewToolStripMenuItem
//
@ -252,29 +256,29 @@
//
// removeToolStripMenuItem
//
this.removeToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_delete;
this.removeToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
this.removeToolStripMenuItem.Name = "removeToolStripMenuItem";
this.removeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.removeToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
this.removeToolStripMenuItem.Text = "Remove";
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(149, 6);
this.toolStripSeparator2.Size = new System.Drawing.Size(138, 6);
//
// moveUpToolStripMenuItem
//
this.moveUpToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_moveup;
this.moveUpToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.MoveUp;
this.moveUpToolStripMenuItem.Name = "moveUpToolStripMenuItem";
this.moveUpToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.moveUpToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
this.moveUpToolStripMenuItem.Text = "Move Up";
this.moveUpToolStripMenuItem.Click += new System.EventHandler(this.moveUpToolStripMenuItem_Click);
//
// moveDownToolStripMenuItem
//
this.moveDownToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_movedown;
this.moveDownToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.MoveDown;
this.moveDownToolStripMenuItem.Name = "moveDownToolStripMenuItem";
this.moveDownToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.moveDownToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
this.moveDownToolStripMenuItem.Text = "Move Down";
this.moveDownToolStripMenuItem.Click += new System.EventHandler(this.moveDownToolStripMenuItem_Click);
//
@ -332,8 +336,18 @@
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.stopAllScriptsToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4);
this.contextMenuStrip1.Size = new System.Drawing.Size(176, 48);
//
// stopAllScriptsToolStripMenuItem
//
this.stopAllScriptsToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Stop;
this.stopAllScriptsToolStripMenuItem.Name = "stopAllScriptsToolStripMenuItem";
this.stopAllScriptsToolStripMenuItem.Size = new System.Drawing.Size(175, 22);
this.stopAllScriptsToolStripMenuItem.Text = "Turn Off All Scripts";
this.stopAllScriptsToolStripMenuItem.Click += new System.EventHandler(this.stopAllScriptsToolStripMenuItem_Click);
//
// LuaConsole
//
@ -352,6 +366,7 @@
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -392,5 +407,6 @@
private System.Windows.Forms.ToolStripMenuItem noneToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem stopAllScriptsToolStripMenuItem;
}
}

View File

@ -77,13 +77,17 @@ namespace BizHawk.MultiClient
LoadConfigSettings();
}
public void Restart()
private void StopAllScripts()
{
//Stop all Lua scripts
for (int x = 0; x < luaList.Count; x++)
luaList[x].Enabled = false;
}
public void Restart()
{
StopAllScripts();
}
private void SaveConfigSettings()
{
Global.Config.LuaConsoleWndx = this.Location.X;
@ -122,9 +126,13 @@ namespace BizHawk.MultiClient
var ofd = new OpenFileDialog();
if (lastLuaFile.Length > 0)
ofd.FileName = Path.GetFileNameWithoutExtension(lastLuaFile);
ofd.InitialDirectory = Global.Config.LuaPath;
ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.LuaPath, "");
ofd.Filter = "Lua Scripts (*.lua)|*.lua|All Files|*.*";
ofd.RestoreDirectory = true;
if (!Directory.Exists(ofd.InitialDirectory))
Directory.CreateDirectory(ofd.InitialDirectory);
Global.Sound.StopSound();
var result = ofd.ShowDialog();
@ -151,10 +159,15 @@ namespace BizHawk.MultiClient
if (file != null)
{
LoadLuaFile(file.FullName);
//DisplayLuaList();
DisplayLuaList();
}
}
public void DisplayLuaList()
{
LuaListView.ItemCount = luaList.Count;
}
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenLuaFile();
@ -237,5 +250,20 @@ namespace BizHawk.MultiClient
{
}
private void newToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void turnOffAllScriptsToolStripMenuItem_Click(object sender, EventArgs e)
{
StopAllScripts();
}
private void stopAllScriptsToolStripMenuItem_Click(object sender, EventArgs e)
{
StopAllScripts();
}
}
}

View File

@ -196,7 +196,7 @@
// cutToolStripButton
//
this.cutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.cutToolStripButton.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_delete;
this.cutToolStripButton.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.cutToolStripButton.Name = "cutToolStripButton";
this.cutToolStripButton.Size = new System.Drawing.Size(23, 22);
@ -346,7 +346,7 @@
//
// removeSelectedToolStripMenuItem1
//
this.removeSelectedToolStripMenuItem1.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_delete;
this.removeSelectedToolStripMenuItem1.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
this.removeSelectedToolStripMenuItem1.Name = "removeSelectedToolStripMenuItem1";
this.removeSelectedToolStripMenuItem1.Size = new System.Drawing.Size(175, 22);
this.removeSelectedToolStripMenuItem1.Text = "Remove Selected";
@ -567,7 +567,7 @@
//
// removeSelectedToolStripMenuItem
//
this.removeSelectedToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_delete;
this.removeSelectedToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
this.removeSelectedToolStripMenuItem.Name = "removeSelectedToolStripMenuItem";
this.removeSelectedToolStripMenuItem.Size = new System.Drawing.Size(218, 22);
this.removeSelectedToolStripMenuItem.Text = "&Remove selected";

View File

@ -281,7 +281,7 @@
//
// removeWatchToolStripMenuItem
//
this.removeWatchToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_delete;
this.removeWatchToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
this.removeWatchToolStripMenuItem.Name = "removeWatchToolStripMenuItem";
this.removeWatchToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R)));
this.removeWatchToolStripMenuItem.Size = new System.Drawing.Size(222, 22);
@ -317,7 +317,7 @@
//
// insertSeparatorToolStripMenuItem
//
this.insertSeparatorToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.InserSeparator;
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(222, 22);
@ -339,7 +339,7 @@
//
// moveUpToolStripMenuItem
//
this.moveUpToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_moveup;
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.Up)));
this.moveUpToolStripMenuItem.Size = new System.Drawing.Size(222, 22);
@ -348,7 +348,7 @@
//
// moveDownToolStripMenuItem
//
this.moveDownToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_movedown;
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.Down)));
this.moveDownToolStripMenuItem.Size = new System.Drawing.Size(222, 22);
@ -491,7 +491,7 @@
//
// removeToolStripMenuItem
//
this.removeToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_delete;
this.removeToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
this.removeToolStripMenuItem.Name = "removeToolStripMenuItem";
this.removeToolStripMenuItem.Size = new System.Drawing.Size(227, 22);
this.removeToolStripMenuItem.Text = "&Remove";
@ -535,7 +535,7 @@
//
// insertSeperatorToolStripMenuItem
//
this.insertSeperatorToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.InserSeparator;
this.insertSeperatorToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.InsertSeparator;
this.insertSeperatorToolStripMenuItem.Name = "insertSeperatorToolStripMenuItem";
this.insertSeperatorToolStripMenuItem.Size = new System.Drawing.Size(227, 22);
this.insertSeperatorToolStripMenuItem.Text = "&Insert Separator";
@ -543,7 +543,7 @@
//
// moveUpToolStripMenuItem1
//
this.moveUpToolStripMenuItem1.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_moveup;
this.moveUpToolStripMenuItem1.Image = global::BizHawk.MultiClient.Properties.Resources.MoveUp;
this.moveUpToolStripMenuItem1.Name = "moveUpToolStripMenuItem1";
this.moveUpToolStripMenuItem1.Size = new System.Drawing.Size(227, 22);
this.moveUpToolStripMenuItem1.Text = "Move &Up";
@ -551,7 +551,7 @@
//
// moveDownToolStripMenuItem1
//
this.moveDownToolStripMenuItem1.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_movedown;
this.moveDownToolStripMenuItem1.Image = global::BizHawk.MultiClient.Properties.Resources.MoveDown;
this.moveDownToolStripMenuItem1.Name = "moveDownToolStripMenuItem1";
this.moveDownToolStripMenuItem1.Size = new System.Drawing.Size(227, 22);
this.moveDownToolStripMenuItem1.Text = "Move &Down";
@ -666,7 +666,7 @@
// cutToolStripButton
//
this.cutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.cutToolStripButton.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_delete;
this.cutToolStripButton.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.cutToolStripButton.Name = "cutToolStripButton";
this.cutToolStripButton.Size = new System.Drawing.Size(23, 22);
@ -720,7 +720,7 @@
// toolStripButton1
//
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton1.Image = global::BizHawk.MultiClient.Properties.Resources.InserSeparator;
this.toolStripButton1.Image = global::BizHawk.MultiClient.Properties.Resources.InsertSeparator;
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
@ -736,7 +736,7 @@
// MoveUpStripButton1
//
this.MoveUpStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.MoveUpStripButton1.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_moveup;
this.MoveUpStripButton1.Image = global::BizHawk.MultiClient.Properties.Resources.MoveUp;
this.MoveUpStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.MoveUpStripButton1.Name = "MoveUpStripButton1";
this.MoveUpStripButton1.Size = new System.Drawing.Size(23, 22);
@ -746,7 +746,7 @@
// MoveDownStripButton1
//
this.MoveDownStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.MoveDownStripButton1.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_movedown;
this.MoveDownStripButton1.Image = global::BizHawk.MultiClient.Properties.Resources.MoveDown;
this.MoveDownStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.MoveDownStripButton1.Name = "MoveDownStripButton1";
this.MoveDownStripButton1.Size = new System.Drawing.Size(23, 22);