C64 - add a c64 menu with a settings menu and dialog

This commit is contained in:
adelikat 2015-10-10 12:20:59 -04:00
parent 3ca25ccb69
commit c57519c54f
6 changed files with 44 additions and 6 deletions

View File

@ -330,6 +330,8 @@
this.ForumsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.FeaturesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AboutMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.C64SubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.C64SettingsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MainStatusBar = new StatusStripEx();
this.DumpStatusButton = new System.Windows.Forms.ToolStripDropDownButton();
this.EmuStatus = new System.Windows.Forms.ToolStripStatusLabel();
@ -433,6 +435,7 @@
this.GenesisSubMenu,
this.wonderSwanToolStripMenuItem,
this.AppleSubMenu,
this.C64SubMenu,
this.HelpSubMenu});
this.MainformMenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow;
this.MainformMenu.Location = new System.Drawing.Point(0, 0);
@ -2926,6 +2929,21 @@
this.AboutMenuItem.Text = "&About";
this.AboutMenuItem.Click += new System.EventHandler(this.AboutMenuItem_Click);
//
// C64SubMenu
//
this.C64SubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.C64SettingsMenuItem});
this.C64SubMenu.Name = "C64SubMenu";
this.C64SubMenu.Size = new System.Drawing.Size(39, 19);
this.C64SubMenu.Text = "&C64";
//
// C64SettingsMenuItem
//
this.C64SettingsMenuItem.Name = "C64SettingsMenuItem";
this.C64SettingsMenuItem.Size = new System.Drawing.Size(152, 22);
this.C64SettingsMenuItem.Text = "&Settings...";
this.C64SettingsMenuItem.Click += new System.EventHandler(this.C64SettingsMenuItem_Click);
//
// MainStatusBar
//
this.MainStatusBar.ClickThrough = true;
@ -3973,6 +3991,8 @@
private System.Windows.Forms.ToolStripMenuItem Speed400MenuItem;
private System.Windows.Forms.ToolStripMenuItem BasicBotMenuItem;
private System.Windows.Forms.ToolStripMenuItem DisplayMessagesMenuItem;
private System.Windows.Forms.ToolStripMenuItem C64SubMenu;
private System.Windows.Forms.ToolStripMenuItem C64SettingsMenuItem;
}
}

View File

@ -2063,6 +2063,15 @@ namespace BizHawk.Client.EmuHawk
#endregion
#region C64
private void C64SettingsMenuItem_Click(object sender, EventArgs e)
{
GenericCoreConfig.DoDialog(this, "C64 Settings");
}
#endregion
#region Help
private void OnlineHelpMenuItem_Click(object sender, EventArgs e)

View File

@ -1595,6 +1595,7 @@ namespace BizHawk.Client.EmuHawk
GenesisSubMenu.Visible = false;
wonderSwanToolStripMenuItem.Visible = false;
AppleSubMenu.Visible = false;
C64SubMenu.Visible = false;
switch (system)
{
@ -1675,6 +1676,9 @@ namespace BizHawk.Client.EmuHawk
case "AppleII":
AppleSubMenu.Visible = true;
break;
case "C64":
C64SubMenu.Visible = true;
break;
}
}

View File

@ -67,6 +67,7 @@
//
// propertyGrid1
//
this.propertyGrid1.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText;
this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
this.propertyGrid1.Location = new System.Drawing.Point(3, 3);
this.propertyGrid1.Name = "propertyGrid1";
@ -88,6 +89,7 @@
//
// propertyGrid2
//
this.propertyGrid2.CategoryForeColor = System.Drawing.SystemColors.InactiveCaptionText;
this.propertyGrid2.Dock = System.Windows.Forms.DockStyle.Fill;
this.propertyGrid2.Location = new System.Drawing.Point(3, 3);
this.propertyGrid2.Name = "propertyGrid2";
@ -143,6 +145,7 @@
this.Controls.Add(this.tabControl1);
this.Name = "GenericCoreConfig";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "GenericCoreConfig";
this.Load += new System.EventHandler(this.GenericCoreConfig_Load);
this.tabControl1.ResumeLayout(false);

View File

@ -9,11 +9,13 @@ using System.Drawing;
namespace BizHawk.Emulation.Cores.Computers.Commodore64
{
public partial class C64 : ISettable<C64.C64Settings, C64.C64SyncSettings>
// adelikat: changing settings to default object untl there are actually settings, as the ui depends on it to know if there are any settings avaialable
public partial class C64 : ISettable<object, C64.C64SyncSettings>
{
public C64Settings GetSettings()
public object /*C64Settings*/ GetSettings()
{
return Settings.Clone();
//return Settings.Clone();
return null;
}
public C64SyncSettings GetSyncSettings()
@ -21,9 +23,9 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
return SyncSettings.Clone();
}
public bool PutSettings(C64Settings o)
public bool PutSettings(object /*C64Settings*/ o)
{
Settings = o;
//Settings = o;
return false;
}

View File

@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
isReleased: false
)]
[ServiceNotApplicable(typeof(ISettable<,>))]
sealed public partial class C64 : IEmulator, IStatable, IInputPollable, IDriveLight, IDebuggable, IDisassemblable, IRegionable, ISettable<C64.C64Settings, C64.C64SyncSettings>
sealed public partial class C64 : IEmulator, IStatable, IInputPollable, IDriveLight, IDebuggable, IDisassemblable, IRegionable, ISettable<object, C64.C64SyncSettings>
{
// framework
public C64(CoreComm comm, GameInfo game, byte[] rom, string romextension, object Settings, object SyncSettings)