N64 Controller Settings - show reboot notification when saving. When a movie is active hide the n64 plugin and controller settings menu items since they manipulate sync settings.

This commit is contained in:
adelikat 2014-05-10 13:49:00 +00:00
parent 975ced7e38
commit 7796bd7cd7
4 changed files with 32 additions and 18 deletions

View File

@ -273,6 +273,7 @@
this.ColecoSkipBiosMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ColecoSkipBiosMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.N64SubMenu = new System.Windows.Forms.ToolStripMenuItem(); this.N64SubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.N64PluginSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.N64PluginSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.N64ControllerSettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SaturnSubMenu = new System.Windows.Forms.ToolStripMenuItem(); this.SaturnSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.SaturnPreferencesMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SaturnPreferencesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.DGBSubMenu = new System.Windows.Forms.ToolStripMenuItem(); this.DGBSubMenu = new System.Windows.Forms.ToolStripMenuItem();
@ -354,7 +355,6 @@
this.ClearSRAMContextMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ClearSRAMContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator(); this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.controllerSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MainformMenu.SuspendLayout(); this.MainformMenu.SuspendLayout();
this.MainStatusBar.SuspendLayout(); this.MainStatusBar.SuspendLayout();
this.MainFormContextMenu.SuspendLayout(); this.MainFormContextMenu.SuspendLayout();
@ -2404,10 +2404,11 @@
// //
this.N64SubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.N64SubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.N64PluginSettingsMenuItem, this.N64PluginSettingsMenuItem,
this.controllerSettingsToolStripMenuItem}); this.N64ControllerSettingsMenuItem});
this.N64SubMenu.Name = "N64SubMenu"; this.N64SubMenu.Name = "N64SubMenu";
this.N64SubMenu.Size = new System.Drawing.Size(40, 19); this.N64SubMenu.Size = new System.Drawing.Size(40, 19);
this.N64SubMenu.Text = "N64"; this.N64SubMenu.Text = "N64";
this.N64SubMenu.DropDownOpened += new System.EventHandler(this.N64SubMenu_DropDownOpened);
// //
// N64PluginSettingsMenuItem // N64PluginSettingsMenuItem
// //
@ -2417,6 +2418,14 @@
this.N64PluginSettingsMenuItem.Text = "Video Plugin Settings..."; this.N64PluginSettingsMenuItem.Text = "Video Plugin Settings...";
this.N64PluginSettingsMenuItem.Click += new System.EventHandler(this.N64PluginSettingsMenuItem_Click); this.N64PluginSettingsMenuItem.Click += new System.EventHandler(this.N64PluginSettingsMenuItem_Click);
// //
// N64ControllerSettingsMenuItem
//
this.N64ControllerSettingsMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.GameController;
this.N64ControllerSettingsMenuItem.Name = "N64ControllerSettingsMenuItem";
this.N64ControllerSettingsMenuItem.Size = new System.Drawing.Size(195, 22);
this.N64ControllerSettingsMenuItem.Text = "Controller Settings...";
this.N64ControllerSettingsMenuItem.Click += new System.EventHandler(this.N64ControllerSettingsMenuItem_Click);
//
// SaturnSubMenu // SaturnSubMenu
// //
this.SaturnSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.SaturnSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -3096,14 +3105,6 @@
this.ShowMenuContextMenuItem.Text = "Show Menu"; this.ShowMenuContextMenuItem.Text = "Show Menu";
this.ShowMenuContextMenuItem.Click += new System.EventHandler(this.ShowMenuContextMenuItem_Click); this.ShowMenuContextMenuItem.Click += new System.EventHandler(this.ShowMenuContextMenuItem_Click);
// //
// controllerSettingsToolStripMenuItem
//
this.controllerSettingsToolStripMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.GameController;
this.controllerSettingsToolStripMenuItem.Name = "controllerSettingsToolStripMenuItem";
this.controllerSettingsToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
this.controllerSettingsToolStripMenuItem.Text = "Controller Settings...";
this.controllerSettingsToolStripMenuItem.Click += new System.EventHandler(this.ControllerSettingsMenuItem_Click);
//
// MainForm // MainForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
@ -3469,7 +3470,7 @@
private System.Windows.Forms.ToolStripMenuItem N64VideoPluginSettingsMenuItem; private System.Windows.Forms.ToolStripMenuItem N64VideoPluginSettingsMenuItem;
private System.Windows.Forms.ToolStripMenuItem ClientOptionsMenuItem; private System.Windows.Forms.ToolStripMenuItem ClientOptionsMenuItem;
private System.Windows.Forms.ToolStripMenuItem customizeToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem customizeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem controllerSettingsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem N64ControllerSettingsMenuItem;
} }
} }

View File

@ -1551,6 +1551,13 @@ namespace BizHawk.Client.EmuHawk
#region N64 #region N64
private void N64SubMenu_DropDownOpened(object sender, EventArgs e)
{
N64PluginSettingsMenuItem.Enabled =
N64ControllerSettingsMenuItem.Enabled =
!Global.MovieSession.Movie.IsActive;
}
private void N64PluginSettingsMenuItem_Click(object sender, EventArgs e) private void N64PluginSettingsMenuItem_Click(object sender, EventArgs e)
{ {
if (new N64VideoPluginconfig().ShowDialog() == DialogResult.OK) if (new N64VideoPluginconfig().ShowDialog() == DialogResult.OK)
@ -1564,6 +1571,19 @@ namespace BizHawk.Client.EmuHawk
} }
} }
private void N64ControllerSettingsMenuItem_Click(object sender, EventArgs e)
{
if (new N64ControllersSetup().ShowDialog() == DialogResult.OK)
{
GlobalWin.MainForm.FlagNeedsReboot();
GlobalWin.OSD.AddMessage("Controller settings saved");
}
else
{
GlobalWin.OSD.AddMessage("Controller settings aborted");
}
}
#endregion #endregion
#region Saturn #region Saturn

View File

@ -3297,10 +3297,5 @@ namespace BizHawk.Client.EmuHawk
{ {
new EmuHawkOptions().ShowDialog(); new EmuHawkOptions().ShowDialog();
} }
private void ControllerSettingsMenuItem_Click(object sender, EventArgs e)
{
new N64ControllersSetup().ShowDialog();
}
} }
} }

View File

@ -57,14 +57,12 @@ namespace BizHawk.Client.EmuHawk
Global.Emulator.PutSyncSettings(n64Settings); Global.Emulator.PutSyncSettings(n64Settings);
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
GlobalWin.OSD.AddMessage("Controller settings saved.");
Close(); Close();
} }
private void CancelBtn_Click(object sender, EventArgs e) private void CancelBtn_Click(object sender, EventArgs e)
{ {
DialogResult = DialogResult.Cancel; DialogResult = DialogResult.Cancel;
GlobalWin.OSD.AddMessage("Controller settings aborted.");
Close(); Close();
} }
} }