Cheats window - refactor - auto-load changed to auto-load dialog and moved to options menu rather than the recent menu since auto-loading the most recent file isn't logical in this dialog

This commit is contained in:
andres.delikat 2011-03-20 21:06:59 +00:00
parent f6eaeda6c9
commit 432de3a7ec
2 changed files with 18 additions and 20 deletions

View File

@ -41,7 +41,6 @@
this.noneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.noneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.autoLoadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.cheatsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.cheatsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -96,6 +95,7 @@
this.disableAllCheatsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.disableAllCheatsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toggleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toggleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.removeSelectedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.removeSelectedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.autoloadDialogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.CheatsMenu.SuspendLayout(); this.CheatsMenu.SuspendLayout();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
this.AddCheatGroup.SuspendLayout(); this.AddCheatGroup.SuspendLayout();
@ -175,8 +175,7 @@
this.recentToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.recentToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.noneToolStripMenuItem, this.noneToolStripMenuItem,
this.toolStripSeparator4, this.toolStripSeparator4,
this.clearToolStripMenuItem, this.clearToolStripMenuItem});
this.autoLoadToolStripMenuItem});
this.recentToolStripMenuItem.Name = "recentToolStripMenuItem"; this.recentToolStripMenuItem.Name = "recentToolStripMenuItem";
this.recentToolStripMenuItem.Size = new System.Drawing.Size(204, 22); this.recentToolStripMenuItem.Size = new System.Drawing.Size(204, 22);
this.recentToolStripMenuItem.Text = "Recent"; this.recentToolStripMenuItem.Text = "Recent";
@ -199,12 +198,6 @@
this.clearToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.clearToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.clearToolStripMenuItem.Text = "Clear"; this.clearToolStripMenuItem.Text = "Clear";
// //
// autoLoadToolStripMenuItem
//
this.autoLoadToolStripMenuItem.Name = "autoLoadToolStripMenuItem";
this.autoLoadToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.autoLoadToolStripMenuItem.Text = "Auto-load";
//
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
@ -292,6 +285,7 @@
this.saveWindowPositionToolStripMenuItem, this.saveWindowPositionToolStripMenuItem,
this.findAndLoadCheatFileByGameToolStripMenuItem, this.findAndLoadCheatFileByGameToolStripMenuItem,
this.CheatsOnOffLoadToolStripMenuItem, this.CheatsOnOffLoadToolStripMenuItem,
this.autoloadDialogToolStripMenuItem,
this.toolStripSeparator5, this.toolStripSeparator5,
this.restoreWindowSizeToolStripMenuItem}); this.restoreWindowSizeToolStripMenuItem});
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
@ -669,7 +663,7 @@
this.removeSelectedToolStripMenuItem, this.removeSelectedToolStripMenuItem,
this.disableAllCheatsToolStripMenuItem1}); this.disableAllCheatsToolStripMenuItem1});
this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(171, 92); this.contextMenuStrip1.Size = new System.Drawing.Size(171, 70);
// //
// disableAllCheatsToolStripMenuItem1 // disableAllCheatsToolStripMenuItem1
// //
@ -692,6 +686,13 @@
this.removeSelectedToolStripMenuItem.Text = "Remove Selected"; this.removeSelectedToolStripMenuItem.Text = "Remove Selected";
this.removeSelectedToolStripMenuItem.Click += new System.EventHandler(this.removeSelectedToolStripMenuItem_Click); this.removeSelectedToolStripMenuItem.Click += new System.EventHandler(this.removeSelectedToolStripMenuItem_Click);
// //
// autoloadDialogToolStripMenuItem
//
this.autoloadDialogToolStripMenuItem.Name = "autoloadDialogToolStripMenuItem";
this.autoloadDialogToolStripMenuItem.Size = new System.Drawing.Size(248, 22);
this.autoloadDialogToolStripMenuItem.Text = "Auto-load Dialog";
this.autoloadDialogToolStripMenuItem.Click += new System.EventHandler(this.autoloadDialogToolStripMenuItem_Click);
//
// Cheats // Cheats
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -776,7 +777,6 @@
private System.Windows.Forms.ToolStripMenuItem noneToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem noneToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem autoLoadToolStripMenuItem;
private System.Windows.Forms.ComboBox DomainComboBox; private System.Windows.Forms.ComboBox DomainComboBox;
private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label6;
private System.Windows.Forms.Button EditButton; private System.Windows.Forms.Button EditButton;
@ -788,5 +788,6 @@
private System.Windows.Forms.ToolStripMenuItem disableAllCheatsToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem disableAllCheatsToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem toggleToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem toggleToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem removeSelectedToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem removeSelectedToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem autoloadDialogToolStripMenuItem;
} }
} }

View File

@ -199,15 +199,6 @@ namespace BizHawk.MultiClient
clearitem.Text = "&Clear"; clearitem.Text = "&Clear";
clearitem.Click += (o, ev) => Global.Config.RecentCheats.Clear(); clearitem.Click += (o, ev) => Global.Config.RecentCheats.Clear();
recentToolStripMenuItem.DropDownItems.Add(clearitem); recentToolStripMenuItem.DropDownItems.Add(clearitem);
var auto = new ToolStripMenuItem();
auto.Text = "&Auto-Load";
auto.Click += (o, ev) => UpdateAutoLoadCheats();
if (Global.Config.AutoLoadCheats == true)
auto.Checked = true;
else
auto.Checked = false;
recentToolStripMenuItem.DropDownItems.Add(auto);
} }
private void LoadConfigSettings() private void LoadConfigSettings()
@ -699,6 +690,7 @@ namespace BizHawk.MultiClient
{ {
saveWindowPositionToolStripMenuItem.Checked = Global.Config.CheatsSaveWindowPosition; saveWindowPositionToolStripMenuItem.Checked = Global.Config.CheatsSaveWindowPosition;
CheatsOnOffLoadToolStripMenuItem.Checked = Global.Config.DisableCheatsOnLoad; CheatsOnOffLoadToolStripMenuItem.Checked = Global.Config.DisableCheatsOnLoad;
autoloadDialogToolStripMenuItem.Checked = Global.Config.AutoLoadCheats;
} }
private void DuplicateCheat() private void DuplicateCheat()
@ -918,5 +910,10 @@ namespace BizHawk.MultiClient
{ {
RemoveCheat(); RemoveCheat();
} }
private void autoloadDialogToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.AutoLoadCheats ^= true;
}
} }
} }