diff --git a/src/BizHawk.Client.EmuHawk/Properties/Resources.cs b/src/BizHawk.Client.EmuHawk/Properties/Resources.cs index a2a7f662f7..896112e818 100644 --- a/src/BizHawk.Client.EmuHawk/Properties/Resources.cs +++ b/src/BizHawk.Client.EmuHawk/Properties/Resources.cs @@ -69,6 +69,7 @@ namespace BizHawk.Client.EmuHawk.Properties internal static readonly Icon CdLoggerIcon = ReadEmbeddedIcon("cdlogger"); internal static readonly Bitmap Checkbox = ReadEmbeddedBitmap("checkbox"); internal static readonly Bitmap Circle = ReadEmbeddedBitmap("Circle"); + internal static readonly Bitmap ClearConsole = ReadEmbeddedBitmap("clear_console"); internal static readonly Bitmap Close = ReadEmbeddedBitmap("Close"); internal static readonly Icon CommandWindow = ReadEmbeddedIcon("commandWindow"); internal static readonly Bitmap Connect16X16 = ReadEmbeddedBitmap("connect_16x16"); diff --git a/src/BizHawk.Client.EmuHawk/images/clear_console.png b/src/BizHawk.Client.EmuHawk/images/clear_console.png new file mode 100644 index 0000000000..2d76c5d110 Binary files /dev/null and b/src/BizHawk.Client.EmuHawk/images/clear_console.png differ diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.Designer.cs index 75c65ba2e6..b190147879 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.Designer.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.Designer.cs @@ -60,6 +60,7 @@ namespace BizHawk.Client.EmuHawk this.EditScriptMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx(); this.RemoveScriptMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx(); this.DuplicateScriptMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx(); + this.ClearConsoleMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx(); this.toolStripSeparator7 = new BizHawk.WinForms.Controls.ToolStripSeparatorEx(); this.InsertSeparatorMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx(); this.MoveUpMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx(); @@ -100,6 +101,7 @@ namespace BizHawk.Client.EmuHawk this.EditToolbarItem = new System.Windows.Forms.ToolStripButton(); this.RemoveScriptToolbarItem = new System.Windows.Forms.ToolStripButton(); this.DuplicateToolbarButton = new System.Windows.Forms.ToolStripButton(); + this.ClearConsoleToolbarButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator2 = new BizHawk.WinForms.Controls.ToolStripSeparatorEx(); this.MoveUpToolbarItem = new System.Windows.Forms.ToolStripButton(); this.toolStripButtonMoveDown = new System.Windows.Forms.ToolStripButton(); @@ -243,6 +245,7 @@ namespace BizHawk.Client.EmuHawk this.EditScriptMenuItem, this.RemoveScriptMenuItem, this.DuplicateScriptMenuItem, + this.ClearConsoleMenuItem, this.toolStripSeparator7, this.InsertSeparatorMenuItem, this.MoveUpMenuItem, @@ -300,6 +303,11 @@ namespace BizHawk.Client.EmuHawk this.DuplicateScriptMenuItem.Text = "&Duplicate Script"; this.DuplicateScriptMenuItem.Click += new System.EventHandler(this.DuplicateScriptMenuItem_Click); // + // ClearConsoleMenuItem + // + this.ClearConsoleMenuItem.Text = "&Clear Output"; + this.ClearConsoleMenuItem.Click += new System.EventHandler(this.ClearConsoleMenuItem_Click); + // // InsertSeparatorMenuItem // this.InsertSeparatorMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I))); @@ -500,6 +508,7 @@ namespace BizHawk.Client.EmuHawk this.EditToolbarItem, this.RemoveScriptToolbarItem, this.DuplicateToolbarButton, + this.ClearConsoleToolbarButton, this.toolStripSeparator2, this.MoveUpToolbarItem, this.toolStripButtonMoveDown, @@ -582,6 +591,15 @@ namespace BizHawk.Client.EmuHawk this.DuplicateToolbarButton.Text = "Duplicate Script"; this.DuplicateToolbarButton.Click += new System.EventHandler(this.DuplicateScriptMenuItem_Click); // + // ClearConsoleToolbarButton + // + this.ClearConsoleToolbarButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.ClearConsoleToolbarButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.ClearConsoleToolbarButton.Name = "ClearConsoleToolbarButton"; + this.ClearConsoleToolbarButton.Size = new System.Drawing.Size(23, 22); + this.ClearConsoleToolbarButton.Text = "Clear Output"; + this.ClearConsoleToolbarButton.Click += new System.EventHandler(this.ClearConsoleMenuItem_Click); + // // MoveUpToolbarItem // this.MoveUpToolbarItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; @@ -765,8 +783,10 @@ namespace BizHawk.Client.EmuHawk private BizHawk.WinForms.Controls.ToolStripSeparatorEx toolStripSeparator10; private System.Windows.Forms.ToolStripButton EraseToolbarItem; private System.Windows.Forms.ToolStripButton DuplicateToolbarButton; + private System.Windows.Forms.ToolStripButton ClearConsoleToolbarButton; private BizHawk.WinForms.Controls.ToolStripMenuItemEx DuplicateScriptMenuItem; - private System.Windows.Forms.TextBox InputBox; + private BizHawk.WinForms.Controls.ToolStripMenuItemEx ClearConsoleMenuItem; + private System.Windows.Forms.TextBox InputBox; private System.Windows.Forms.SplitContainer splitContainer1; private BizHawk.WinForms.Controls.ToolStripMenuItemEx ReturnAllIfNoneSelectedMenuItem; private BizHawk.WinForms.Controls.ToolStripMenuItemEx ReloadWhenScriptFileChangesMenuItem; diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs index 115d55aa9c..8af3a87536 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs @@ -107,6 +107,7 @@ namespace BizHawk.Client.EmuHawk EditToolbarItem.Image = Resources.Cut; RemoveScriptToolbarItem.Image = Resources.Delete; DuplicateToolbarButton.Image = Resources.Duplicate; + ClearConsoleToolbarButton.Image = Resources.ClearConsole; MoveUpToolbarItem.Image = Resources.MoveUp; toolStripButtonMoveDown.Image = Resources.MoveDown; InsertSeparatorToolbarItem.Image = Resources.InsertSeparator; @@ -1022,6 +1023,11 @@ namespace BizHawk.Client.EmuHawk } } + private void ClearConsoleMenuItem_Click(object sender, EventArgs e) + { + ClearOutputWindow(); + } + private void InsertSeparatorMenuItem_Click(object sender, EventArgs e) { LuaImp.ScriptList.Insert(LuaListView.SelectionStartIndex ?? LuaImp.ScriptList.Count, LuaFile.SeparatorInstance);