Move a bunch of config menu items into a Customize dialog box

This commit is contained in:
adelikat 2014-05-06 01:27:56 +00:00
parent bc8f44a6c9
commit 80497a4bb4
8 changed files with 741 additions and 360 deletions

View File

@ -79,7 +79,6 @@ namespace BizHawk.Client.Common
public bool ShowLogWindow = false;
public bool BackupSavestates = true;
public bool BackupSaveram = true;
public bool AutoSavestates = false;
public bool SaveScreenshotWithStates = true;
public int AutofireOn = 1;
public int AutofireOff = 1;
@ -150,8 +149,6 @@ namespace BizHawk.Client.Common
public int DispMultix = 0;
public int DispMultiy = 14;
public int DispMultianchor = 1;
public bool DisplayGDI = false;
public bool SuppressGui = false;
public bool DisplayStatusBar = true;
public int DispRamWatchx = 0;
public int DispRamWatchy = 70;

View File

@ -272,6 +272,12 @@
<Compile Include="config\GenericCoreConfig.Designer.cs">
<DependentUpon>GenericCoreConfig.cs</DependentUpon>
</Compile>
<Compile Include="config\GuiOptions.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="config\GuiOptions.Designer.cs">
<DependentUpon>GuiOptions.cs</DependentUpon>
</Compile>
<Compile Include="config\HotkeyConfig.cs">
<SubType>Form</SubType>
</Compile>
@ -1003,6 +1009,9 @@
<EmbeddedResource Include="config\GenericCoreConfig.resx">
<DependentUpon>GenericCoreConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="config\GuiOptions.resx">
<DependentUpon>GuiOptions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="config\HotkeyConfig.resx">
<DependentUpon>HotkeyConfig.cs</DependentUpon>
</EmbeddedResource>

View File

@ -135,27 +135,8 @@
this.AutofireMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.RewindOptionsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.extensionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ClientOptionsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.ConfigEnableSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.EnableContextMenuMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.BackupSavestatesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AutoSavestatesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SaveScreenshotInSavestatesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.FrameAdvanceSkipLagMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.BackupSaveramMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.GuiSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.PauseWhenMenuActivatedMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.StartPausedMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator22 = new System.Windows.Forms.ToolStripSeparator();
this.SaveWindowPositionMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SuppressGuiLayerMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ShowMenuInFullScreenMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.RunInBackgroundMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.BackgroundInputMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SingleInstanceModeMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.DontAskToSaveChangesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator23 = new System.Windows.Forms.ToolStripSeparator();
this.LogWindowAsConsoleMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SpeedSkipSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ClickThrottleMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AudioThrottleMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -1254,9 +1235,8 @@
this.AutofireMenuItem,
this.RewindOptionsMenuItem,
this.extensionsToolStripMenuItem,
this.ClientOptionsMenuItem,
this.toolStripSeparator9,
this.ConfigEnableSubMenu,
this.GuiSubMenu,
this.SpeedSkipSubMenu,
this.KeyPrioritySubMenu,
this.SavestateTypeSubMenu,
@ -1348,167 +1328,18 @@
this.extensionsToolStripMenuItem.Text = "File Extensions...";
this.extensionsToolStripMenuItem.Click += new System.EventHandler(this.extensionsToolStripMenuItem_Click);
//
// ClientOptionsMenuItem
//
this.ClientOptionsMenuItem.Name = "ClientOptionsMenuItem";
this.ClientOptionsMenuItem.Size = new System.Drawing.Size(159, 22);
this.ClientOptionsMenuItem.Text = "&Customize...";
this.ClientOptionsMenuItem.Click += new System.EventHandler(this.guiOptionsToolStripMenuItem_Click);
//
// toolStripSeparator9
//
this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(156, 6);
//
// ConfigEnableSubMenu
//
this.ConfigEnableSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.EnableContextMenuMenuItem,
this.BackupSavestatesMenuItem,
this.AutoSavestatesMenuItem,
this.SaveScreenshotInSavestatesMenuItem,
this.FrameAdvanceSkipLagMenuItem,
this.BackupSaveramMenuItem});
this.ConfigEnableSubMenu.Name = "ConfigEnableSubMenu";
this.ConfigEnableSubMenu.Size = new System.Drawing.Size(159, 22);
this.ConfigEnableSubMenu.Text = "&Enable";
this.ConfigEnableSubMenu.DropDownOpened += new System.EventHandler(this.EnableMenuItem_DropDownOpened);
//
// EnableContextMenuMenuItem
//
this.EnableContextMenuMenuItem.Name = "EnableContextMenuMenuItem";
this.EnableContextMenuMenuItem.Size = new System.Drawing.Size(229, 22);
this.EnableContextMenuMenuItem.Text = "Enable Context Menu";
this.EnableContextMenuMenuItem.Click += new System.EventHandler(this.EnableContextMenuMenuItem_Click);
//
// BackupSavestatesMenuItem
//
this.BackupSavestatesMenuItem.Name = "BackupSavestatesMenuItem";
this.BackupSavestatesMenuItem.Size = new System.Drawing.Size(229, 22);
this.BackupSavestatesMenuItem.Text = "Backup Savestates";
this.BackupSavestatesMenuItem.Click += new System.EventHandler(this.BackupSavestatesMenuItem_Click);
//
// AutoSavestatesMenuItem
//
this.AutoSavestatesMenuItem.Name = "AutoSavestatesMenuItem";
this.AutoSavestatesMenuItem.Size = new System.Drawing.Size(229, 22);
this.AutoSavestatesMenuItem.Text = "Auto Savestates";
this.AutoSavestatesMenuItem.Click += new System.EventHandler(this.AutoSavestatesMenuItem_Click);
//
// SaveScreenshotInSavestatesMenuItem
//
this.SaveScreenshotInSavestatesMenuItem.Name = "SaveScreenshotInSavestatesMenuItem";
this.SaveScreenshotInSavestatesMenuItem.Size = new System.Drawing.Size(229, 22);
this.SaveScreenshotInSavestatesMenuItem.Text = "Save Screenshot in Savestates";
this.SaveScreenshotInSavestatesMenuItem.Click += new System.EventHandler(this.ScreenshotWithSavestatesMenuItem_Click);
//
// FrameAdvanceSkipLagMenuItem
//
this.FrameAdvanceSkipLagMenuItem.Name = "FrameAdvanceSkipLagMenuItem";
this.FrameAdvanceSkipLagMenuItem.Size = new System.Drawing.Size(229, 22);
this.FrameAdvanceSkipLagMenuItem.Text = "Frame Advance - Skip Lag";
this.FrameAdvanceSkipLagMenuItem.Click += new System.EventHandler(this.frameAdvanceSkipLagFramesToolStripMenuItem_Click);
//
// BackupSaveramMenuItem
//
this.BackupSaveramMenuItem.Name = "BackupSaveramMenuItem";
this.BackupSaveramMenuItem.Size = new System.Drawing.Size(229, 22);
this.BackupSaveramMenuItem.Text = "Backup Saveram";
this.BackupSaveramMenuItem.Click += new System.EventHandler(this.BackupSaveramMenuItem_Click);
//
// GuiSubMenu
//
this.GuiSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.PauseWhenMenuActivatedMenuItem,
this.StartPausedMenuItem,
this.toolStripSeparator22,
this.SaveWindowPositionMenuItem,
this.SuppressGuiLayerMenuItem,
this.ShowMenuInFullScreenMenuItem,
this.RunInBackgroundMenuItem,
this.BackgroundInputMenuItem,
this.SingleInstanceModeMenuItem,
this.DontAskToSaveChangesMenuItem,
this.toolStripSeparator23,
this.LogWindowAsConsoleMenuItem});
this.GuiSubMenu.Name = "GuiSubMenu";
this.GuiSubMenu.Size = new System.Drawing.Size(159, 22);
this.GuiSubMenu.Text = "GUI";
this.GuiSubMenu.DropDownOpened += new System.EventHandler(this.GuiSubMenu_DropDownOpened);
//
// PauseWhenMenuActivatedMenuItem
//
this.PauseWhenMenuActivatedMenuItem.Name = "PauseWhenMenuActivatedMenuItem";
this.PauseWhenMenuActivatedMenuItem.Size = new System.Drawing.Size(241, 22);
this.PauseWhenMenuActivatedMenuItem.Text = "Pause when menu activated";
this.PauseWhenMenuActivatedMenuItem.Click += new System.EventHandler(this.PauseWhenMenuActivatedMenuItem_Click);
//
// StartPausedMenuItem
//
this.StartPausedMenuItem.Name = "StartPausedMenuItem";
this.StartPausedMenuItem.Size = new System.Drawing.Size(241, 22);
this.StartPausedMenuItem.Text = "Start paused";
this.StartPausedMenuItem.Click += new System.EventHandler(this.StartPausedMenuItem_Click);
//
// toolStripSeparator22
//
this.toolStripSeparator22.Name = "toolStripSeparator22";
this.toolStripSeparator22.Size = new System.Drawing.Size(238, 6);
//
// SaveWindowPositionMenuItem
//
this.SaveWindowPositionMenuItem.Name = "SaveWindowPositionMenuItem";
this.SaveWindowPositionMenuItem.Size = new System.Drawing.Size(241, 22);
this.SaveWindowPositionMenuItem.Text = "Save window position";
this.SaveWindowPositionMenuItem.Click += new System.EventHandler(this.SaveWindowPositionMenuItem_Click);
//
// SuppressGuiLayerMenuItem
//
this.SuppressGuiLayerMenuItem.Name = "SuppressGuiLayerMenuItem";
this.SuppressGuiLayerMenuItem.Size = new System.Drawing.Size(241, 22);
this.SuppressGuiLayerMenuItem.Text = "Suppress GUI Layer";
this.SuppressGuiLayerMenuItem.Click += new System.EventHandler(this.SuppressGuiLayerMenuItem_Click);
//
// ShowMenuInFullScreenMenuItem
//
this.ShowMenuInFullScreenMenuItem.Name = "ShowMenuInFullScreenMenuItem";
this.ShowMenuInFullScreenMenuItem.Size = new System.Drawing.Size(241, 22);
this.ShowMenuInFullScreenMenuItem.Text = "Show Menu in Full Screen";
this.ShowMenuInFullScreenMenuItem.Click += new System.EventHandler(this.ShowMenuInFullScreenMenuItem_Click);
//
// RunInBackgroundMenuItem
//
this.RunInBackgroundMenuItem.Name = "RunInBackgroundMenuItem";
this.RunInBackgroundMenuItem.Size = new System.Drawing.Size(241, 22);
this.RunInBackgroundMenuItem.Text = "Run in Background";
this.RunInBackgroundMenuItem.Click += new System.EventHandler(this.RunInBackgroundMenuItem_Click);
//
// BackgroundInputMenuItem
//
this.BackgroundInputMenuItem.Name = "BackgroundInputMenuItem";
this.BackgroundInputMenuItem.Size = new System.Drawing.Size(241, 22);
this.BackgroundInputMenuItem.Text = "Accept Background Input";
this.BackgroundInputMenuItem.Click += new System.EventHandler(this.BackgroundInputMenuItem_Click);
//
// SingleInstanceModeMenuItem
//
this.SingleInstanceModeMenuItem.Name = "SingleInstanceModeMenuItem";
this.SingleInstanceModeMenuItem.Size = new System.Drawing.Size(241, 22);
this.SingleInstanceModeMenuItem.Text = "Single Instance Mode";
this.SingleInstanceModeMenuItem.Click += new System.EventHandler(this.SingleInstanceModeMenuItem_Click);
//
// DontAskToSaveChangesMenuItem
//
this.DontAskToSaveChangesMenuItem.Name = "DontAskToSaveChangesMenuItem";
this.DontAskToSaveChangesMenuItem.Size = new System.Drawing.Size(241, 22);
this.DontAskToSaveChangesMenuItem.Text = "Never be asked to save changes";
this.DontAskToSaveChangesMenuItem.Click += new System.EventHandler(this.DontAskToSaveChangesMenuItem_Click);
//
// toolStripSeparator23
//
this.toolStripSeparator23.Name = "toolStripSeparator23";
this.toolStripSeparator23.Size = new System.Drawing.Size(238, 6);
//
// LogWindowAsConsoleMenuItem
//
this.LogWindowAsConsoleMenuItem.Name = "LogWindowAsConsoleMenuItem";
this.LogWindowAsConsoleMenuItem.Size = new System.Drawing.Size(241, 22);
this.LogWindowAsConsoleMenuItem.Text = "Log Window as Console";
this.LogWindowAsConsoleMenuItem.Click += new System.EventHandler(this.LogWindowAsConsoleMenuItem_Click);
//
// SpeedSkipSubMenu
//
this.SpeedSkipSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -1741,21 +1572,21 @@
// SavestateTypeDefaultMenuItem
//
this.SavestateTypeDefaultMenuItem.Name = "SavestateTypeDefaultMenuItem";
this.SavestateTypeDefaultMenuItem.Size = new System.Drawing.Size(152, 22);
this.SavestateTypeDefaultMenuItem.Size = new System.Drawing.Size(112, 22);
this.SavestateTypeDefaultMenuItem.Text = "Default";
this.SavestateTypeDefaultMenuItem.Click += new System.EventHandler(this.SavestateTypeDefaultMenuItem_Click);
//
// SavestateBinaryMenuItem
//
this.SavestateBinaryMenuItem.Name = "SavestateBinaryMenuItem";
this.SavestateBinaryMenuItem.Size = new System.Drawing.Size(152, 22);
this.SavestateBinaryMenuItem.Size = new System.Drawing.Size(112, 22);
this.SavestateBinaryMenuItem.Text = "Binary";
this.SavestateBinaryMenuItem.Click += new System.EventHandler(this.SavestateBinaryMenuItem_Click);
//
// SavestateTextMenuItem
//
this.SavestateTextMenuItem.Name = "SavestateTextMenuItem";
this.SavestateTextMenuItem.Size = new System.Drawing.Size(152, 22);
this.SavestateTextMenuItem.Size = new System.Drawing.Size(112, 22);
this.SavestateTextMenuItem.Text = "Text";
this.SavestateTextMenuItem.Click += new System.EventHandler(this.SavestateTextMenuItem_Click);
//
@ -3371,11 +3202,7 @@
private System.Windows.Forms.ToolStripMenuItem StopMovieMenuItem;
private System.Windows.Forms.ToolStripMenuItem PlayFromBeginningMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
private System.Windows.Forms.ToolStripMenuItem GuiSubMenu;
private System.Windows.Forms.ToolStripMenuItem PauseWhenMenuActivatedMenuItem;
private System.Windows.Forms.ToolStripMenuItem SoundMenuItem;
private System.Windows.Forms.ToolStripMenuItem SaveWindowPositionMenuItem;
private System.Windows.Forms.ToolStripMenuItem StartPausedMenuItem;
private System.Windows.Forms.ToolStripMenuItem SpeedSkipSubMenu;
private System.Windows.Forms.ToolStripMenuItem VsyncThrottleMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem3;
@ -3426,8 +3253,6 @@
private System.Windows.Forms.ToolStripMenuItem ScreenshotSubMenu;
private System.Windows.Forms.ToolStripMenuItem ScreenshotMenuItem;
private System.Windows.Forms.ToolStripMenuItem ScreenshotAsMenuItem;
private System.Windows.Forms.ToolStripMenuItem RunInBackgroundMenuItem;
private System.Windows.Forms.ToolStripMenuItem BackgroundInputMenuItem;
private System.Windows.Forms.ToolStripMenuItem TAStudioMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem4;
private System.Windows.Forms.ToolStripMenuItem DisplayStatusBarMenuItem;
@ -3477,10 +3302,6 @@
private System.Windows.Forms.ToolStripMenuItem AutofireMenuItem;
private System.Windows.Forms.ToolStripMenuItem AutoloadLastSlotMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator21;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator22;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator23;
private System.Windows.Forms.ToolStripMenuItem LogWindowAsConsoleMenuItem;
private System.Windows.Forms.ToolStripMenuItem ShowMenuInFullScreenMenuItem;
private System.Windows.Forms.ToolStripMenuItem ShowMenuContextMenuItem;
private System.Windows.Forms.ToolStripMenuItem ImportMoviesMenuItem;
private System.Windows.Forms.ToolStripMenuItem ForumsMenuItem;
@ -3500,14 +3321,6 @@
private System.Windows.Forms.ToolStripMenuItem PCEBGViewerMenuItem;
private System.Windows.Forms.ToolStripMenuItem ScreenshotContextMenuItem;
private System.Windows.Forms.ToolStripMenuItem AtariSubMenu;
private System.Windows.Forms.ToolStripMenuItem ConfigEnableSubMenu;
private System.Windows.Forms.ToolStripMenuItem EnableContextMenuMenuItem;
private System.Windows.Forms.ToolStripMenuItem BackupSavestatesMenuItem;
private System.Windows.Forms.ToolStripMenuItem AutoSavestatesMenuItem;
private System.Windows.Forms.ToolStripMenuItem SaveScreenshotInSavestatesMenuItem;
private System.Windows.Forms.ToolStripMenuItem SingleInstanceModeMenuItem;
private System.Windows.Forms.ToolStripMenuItem SuppressGuiLayerMenuItem;
private System.Windows.Forms.ToolStripMenuItem DontAskToSaveChangesMenuItem;
private System.Windows.Forms.ToolStripMenuItem NESSoundChannelsMenuItem;
private System.Windows.Forms.ToolStripMenuItem SNESSubMenu;
private System.Windows.Forms.ToolStripMenuItem SnesGfxDebuggerMenuItem;
@ -3522,7 +3335,6 @@
private System.Windows.Forms.ToolStripMenuItem SnesObj3MenuItem;
private System.Windows.Forms.ToolStripMenuItem SnesObj4MenuItem;
private System.Windows.Forms.ToolStripMenuItem GBPaletteConfigMenuItem;
private System.Windows.Forms.ToolStripMenuItem FrameAdvanceSkipLagMenuItem;
private System.Windows.Forms.ToolStripMenuItem GBForceDMGMenuItem;
private System.Windows.Forms.ToolStripMenuItem GBAInCGBModeMenuItem;
private System.Windows.Forms.ToolStripMenuItem GBMulticartCompatibilityMenuItem;
@ -3533,7 +3345,6 @@
private System.Windows.Forms.ToolStripMenuItem ScreenshotCaptureOSDMenuItem1;
private System.Windows.Forms.ToolStripMenuItem LoadGBInSGBMenuItem;
private System.Windows.Forms.ToolStripMenuItem SnesGBInSGBMenuItem;
private System.Windows.Forms.ToolStripMenuItem BackupSaveramMenuItem;
private System.Windows.Forms.ToolStripStatusLabel RebootStatusBarIcon;
private System.Windows.Forms.ToolStripMenuItem TraceLoggerMenuItem;
private System.Windows.Forms.ToolStripMenuItem ShowClippedRegionsMenuItem;
@ -3637,6 +3448,7 @@
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem67;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.ToolStripMenuItem N64VideoPluginSettingsMenuItem;
private System.Windows.Forms.ToolStripMenuItem ClientOptionsMenuItem;
}
}

View File

@ -664,11 +664,11 @@ namespace BizHawk.Client.EmuHawk
if (Global.Config.ShowLogWindow)
{
ShowConsole();
LogConsole.ShowConsole();
}
else
{
HideConsole();
LogConsole.HideConsole();
}
}
@ -681,32 +681,6 @@ namespace BizHawk.Client.EmuHawk
ControllersMenuItem.Enabled = !(Global.Emulator is NullEmulator);
}
private void EnableMenuItem_DropDownOpened(object sender, EventArgs e)
{
EnableContextMenuMenuItem.Checked = Global.Config.ShowContextMenu;
BackupSavestatesMenuItem.Checked = Global.Config.BackupSavestates;
AutoSavestatesMenuItem.Checked = Global.Config.AutoSavestates;
SaveScreenshotInSavestatesMenuItem.Checked = Global.Config.SaveScreenshotWithStates;
FrameAdvanceSkipLagMenuItem.Checked = Global.Config.SkipLagFrame;
BackupSaveramMenuItem.Checked = Global.Config.BackupSaveram;
}
private void GuiSubMenu_DropDownOpened(object sender, EventArgs e)
{
PauseWhenMenuActivatedMenuItem.Checked = Global.Config.PauseWhenMenuActivated;
StartPausedMenuItem.Checked = Global.Config.StartPaused;
SaveWindowPositionMenuItem.Checked = Global.Config.SaveWindowPosition;
SuppressGuiLayerMenuItem.Checked = Global.Config.SuppressGui;
ShowMenuInFullScreenMenuItem.Checked = Global.Config.ShowMenuInFullscreen;
RunInBackgroundMenuItem.Checked = Global.Config.RunInBackground;
BackgroundInputMenuItem.Checked = Global.Config.AcceptBackgroundInput;
SingleInstanceModeMenuItem.Checked = Global.Config.SingleInstanceMode;
LogWindowAsConsoleMenuItem.Checked = Global.Config.WIN32_CONSOLE;
DontAskToSaveChangesMenuItem.Checked = Global.Config.SupressAskSave;
BackgroundInputMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Toggle BG Input"].Bindings;
}
private void FrameSkipMenuItem_DropDownOpened(object sender, EventArgs e)
{
MinimizeSkippingMenuItem.Checked = Global.Config.AutoMinimizeSkipping;
@ -830,107 +804,6 @@ namespace BizHawk.Client.EmuHawk
new FirmwaresConfig().Show();
}
private void EnableContextMenuMenuItem_Click(object sender, EventArgs e)
{
Global.Config.ShowContextMenu ^= true;
GlobalWin.OSD.AddMessage(Global.Config.ShowContextMenu ? "Context menu enabled" : "Context menu disabled");
}
private void BackupSavestatesMenuItem_Click(object sender, EventArgs e)
{
Global.Config.BackupSavestates ^= true;
GlobalWin.OSD.AddMessage(Global.Config.BackupSavestates ? "Backup savestates enabled" : "Backup savestates disabled");
}
private void AutoSavestatesMenuItem_Click(object sender, EventArgs e)
{
Global.Config.AutoSavestates ^= true;
GlobalWin.OSD.AddMessage(Global.Config.AutoSavestates ? "AutoSavestates enabled" : "AutoSavestates disabled");
}
private void ScreenshotWithSavestatesMenuItem_Click(object sender, EventArgs e)
{
Global.Config.SaveScreenshotWithStates ^= true;
GlobalWin.OSD.AddMessage(Global.Config.SaveScreenshotWithStates
? "Screenshots will be saved in savestates"
: "Screenshots will not be saved in savestates");
}
private void frameAdvanceSkipLagFramesToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.SkipLagFrame ^= true;
}
private void BackupSaveramMenuItem_Click(object sender, EventArgs e)
{
Global.Config.BackupSaveram ^= true;
GlobalWin.OSD.AddMessage(Global.Config.BackupSaveram ? "Backup saveram enabled" : "Backup saveram disabled");
}
private void PauseWhenMenuActivatedMenuItem_Click(object sender, EventArgs e)
{
Global.Config.PauseWhenMenuActivated ^= true;
}
private void StartPausedMenuItem_Click(object sender, EventArgs e)
{
Global.Config.StartPaused ^= true;
}
private void SaveWindowPositionMenuItem_Click(object sender, EventArgs e)
{
Global.Config.SaveWindowPosition ^= true;
}
private void UseGDIMenuItem_Click(object sender, EventArgs e)
{
//TODO GL - this concept is gone
//Global.Config.DisplayGDI ^= true;
//SyncPresentationMode();
}
private void SuppressGuiLayerMenuItem_Click(object sender, EventArgs e)
{
Global.Config.SuppressGui ^= true;
}
private void ShowMenuInFullScreenMenuItem_Click(object sender, EventArgs e)
{
Global.Config.ShowMenuInFullscreen ^= true;
//make sure this gets applied immediately
if (_inFullscreen)
{
MainMenuStrip.Visible = Global.Config.ShowMenuInFullscreen;
}
}
private void RunInBackgroundMenuItem_Click(object sender, EventArgs e)
{
Global.Config.RunInBackground ^= true;
}
private void BackgroundInputMenuItem_Click(object sender, EventArgs e)
{
ToggleBackgroundInput();
}
private void SingleInstanceModeMenuItem_Click(object sender, EventArgs e)
{
Global.Config.SingleInstanceMode ^= true;
MessageBox.Show("BizHawk must be restarted for this setting to take effect.", "Reboot Required", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void DontAskToSaveChangesMenuItem_Click(object sender, EventArgs e)
{
Global.Config.SupressAskSave ^= true;
}
private void LogWindowAsConsoleMenuItem_Click(object sender, EventArgs e)
{
Global.Config.WIN32_CONSOLE ^= true;
}
private void ClickThrottleMenuItem_Click(object sender, EventArgs e)
{
Global.Config.ClockThrottle ^= true;
@ -949,6 +822,7 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.PresentationPanel.Resized = true;
}
}
LimitFrameRateMessage();
}

View File

@ -76,7 +76,7 @@ namespace BizHawk.Client.EmuHawk
Global.Game = GameInfo.GetNullGame();
if (Global.Config.ShowLogWindow)
{
ShowConsole();
LogConsole.ShowConsole();
DisplayLogWindowMenuItem.Checked = true;
}
@ -725,10 +725,7 @@ namespace BizHawk.Client.EmuHawk
public void RebootCore()
{
bool autoSaveState = Global.Config.AutoSavestates;
Global.Config.AutoSavestates = false;
LoadRom(CurrentlyOpenRom);
Global.Config.AutoSavestates = autoSaveState;
}
public void PauseEmulator()
@ -831,6 +828,11 @@ namespace BizHawk.Client.EmuHawk
[System.Runtime.InteropServices.DllImport("user32.dll", SetLastError = true)]
static extern int GetWindowLong(IntPtr hWnd, int nIndex);
public bool IsInFullscreen
{
get { return _inFullscreen; }
}
public void ToggleFullscreen()
{
if (_inFullscreen == false)
@ -894,7 +896,6 @@ namespace BizHawk.Client.EmuHawk
public void NotifyLogWindowClosing()
{
DisplayLogWindowMenuItem.Checked = false;
LogWindowAsConsoleMenuItem.Enabled = true;
}
public void ClickSpeedItem(int num)
@ -1958,18 +1959,6 @@ namespace BizHawk.Client.EmuHawk
return null;
}
private void ShowConsole()
{
LogConsole.ShowConsole();
LogWindowAsConsoleMenuItem.Enabled = false;
}
private void HideConsole()
{
LogConsole.HideConsole();
LogWindowAsConsoleMenuItem.Enabled = true;
}
private void IncreaseWindowSize()
{
switch (Global.Config.TargetZoomFactor)
@ -3030,11 +3019,6 @@ namespace BizHawk.Client.EmuHawk
LoadSaveRam();
}
if (Global.Config.AutoSavestates)
{
LoadQuickSave("Auto");
}
GlobalWin.Tools.Restart();
if (Global.Config.LoadCheatFileByGame)
@ -3123,11 +3107,6 @@ namespace BizHawk.Client.EmuHawk
// its very tricky. rename to be more clear or combine them.
private void CloseGame(bool clearSram = false)
{
if (Global.Config.AutoSavestates && Global.Emulator is NullEmulator == false)
{
SaveQuickSave("Auto");
}
if (clearSram)
{
var path = PathManager.SaveRamPath(Global.Game);
@ -3309,5 +3288,10 @@ namespace BizHawk.Client.EmuHawk
{
N64PluginSettingsMenuItem_Click(sender, e);
}
private void guiOptionsToolStripMenuItem_Click(object sender, EventArgs e)
{
new EmuHawkOptions().ShowDialog();
}
}
}

View File

@ -0,0 +1,496 @@
namespace BizHawk.Client.EmuHawk
{
partial class EmuHawkOptions
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.OkBtn = new System.Windows.Forms.Button();
this.CancelBtn = new System.Windows.Forms.Button();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.label3 = new System.Windows.Forms.Label();
this.SingleInstanceModeCheckbox = new System.Windows.Forms.CheckBox();
this.NeverAskSaveCheckbox = new System.Windows.Forms.CheckBox();
this.label2 = new System.Windows.Forms.Label();
this.AcceptBackgroundInputCheckbox = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.RunInBackgroundCheckbox = new System.Windows.Forms.CheckBox();
this.ShowMenuInFullScreenCheckbox = new System.Windows.Forms.CheckBox();
this.SaveWindowPositionCheckbox = new System.Windows.Forms.CheckBox();
this.EnableContextMenuCheckbox = new System.Windows.Forms.CheckBox();
this.StartPausedCheckbox = new System.Windows.Forms.CheckBox();
this.PauseWhenMenuActivatedCheckbox = new System.Windows.Forms.CheckBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.BackupSRamCheckbox = new System.Windows.Forms.CheckBox();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.ScreenshotInStatesCheckbox = new System.Windows.Forms.CheckBox();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.BackupSavestatesCheckbox = new System.Windows.Forms.CheckBox();
this.label4 = new System.Windows.Forms.Label();
this.LogWindowAsConsoleCheckbox = new System.Windows.Forms.CheckBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.FrameAdvSkipLagCheckbox = new System.Windows.Forms.CheckBox();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage3.SuspendLayout();
this.tabPage2.SuspendLayout();
this.SuspendLayout();
//
// OkBtn
//
this.OkBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.OkBtn.Location = new System.Drawing.Point(280, 367);
this.OkBtn.Name = "OkBtn";
this.OkBtn.Size = new System.Drawing.Size(60, 23);
this.OkBtn.TabIndex = 0;
this.OkBtn.Text = "&Ok";
this.OkBtn.UseVisualStyleBackColor = true;
this.OkBtn.Click += new System.EventHandler(this.OkBtn_Click);
//
// CancelBtn
//
this.CancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.CancelBtn.Location = new System.Drawing.Point(346, 367);
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.Size = new System.Drawing.Size(60, 23);
this.CancelBtn.TabIndex = 1;
this.CancelBtn.Text = "&Cancel";
this.CancelBtn.UseVisualStyleBackColor = true;
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(12, 12);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(394, 349);
this.tabControl1.TabIndex = 2;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.label14);
this.tabPage1.Controls.Add(this.label3);
this.tabPage1.Controls.Add(this.SingleInstanceModeCheckbox);
this.tabPage1.Controls.Add(this.NeverAskSaveCheckbox);
this.tabPage1.Controls.Add(this.label2);
this.tabPage1.Controls.Add(this.AcceptBackgroundInputCheckbox);
this.tabPage1.Controls.Add(this.label1);
this.tabPage1.Controls.Add(this.RunInBackgroundCheckbox);
this.tabPage1.Controls.Add(this.ShowMenuInFullScreenCheckbox);
this.tabPage1.Controls.Add(this.SaveWindowPositionCheckbox);
this.tabPage1.Controls.Add(this.EnableContextMenuCheckbox);
this.tabPage1.Controls.Add(this.StartPausedCheckbox);
this.tabPage1.Controls.Add(this.PauseWhenMenuActivatedCheckbox);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(386, 323);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "General";
this.tabPage1.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(26, 285);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(272, 13);
this.label3.TabIndex = 11;
this.label3.Text = "Enable to force only one instance of EmuHawk at a time";
//
// SingleInstanceModeCheckbox
//
this.SingleInstanceModeCheckbox.AutoSize = true;
this.SingleInstanceModeCheckbox.Location = new System.Drawing.Point(6, 265);
this.SingleInstanceModeCheckbox.Name = "SingleInstanceModeCheckbox";
this.SingleInstanceModeCheckbox.Size = new System.Drawing.Size(127, 17);
this.SingleInstanceModeCheckbox.TabIndex = 10;
this.SingleInstanceModeCheckbox.Text = "Single instance mode";
this.SingleInstanceModeCheckbox.UseVisualStyleBackColor = true;
//
// NeverAskSaveCheckbox
//
this.NeverAskSaveCheckbox.AutoSize = true;
this.NeverAskSaveCheckbox.Location = new System.Drawing.Point(6, 146);
this.NeverAskSaveCheckbox.Name = "NeverAskSaveCheckbox";
this.NeverAskSaveCheckbox.Size = new System.Drawing.Size(184, 17);
this.NeverAskSaveCheckbox.TabIndex = 9;
this.NeverAskSaveCheckbox.Text = "Never be asked to save changes";
this.NeverAskSaveCheckbox.UseVisualStyleBackColor = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(26, 245);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(349, 13);
this.label2.TabIndex = 8;
this.label2.Text = "When this is set, the client will receive user input even when focus is lost";
//
// AcceptBackgroundInputCheckbox
//
this.AcceptBackgroundInputCheckbox.AutoSize = true;
this.AcceptBackgroundInputCheckbox.Location = new System.Drawing.Point(6, 225);
this.AcceptBackgroundInputCheckbox.Name = "AcceptBackgroundInputCheckbox";
this.AcceptBackgroundInputCheckbox.Size = new System.Drawing.Size(146, 17);
this.AcceptBackgroundInputCheckbox.TabIndex = 7;
this.AcceptBackgroundInputCheckbox.Text = "Accept background input";
this.AcceptBackgroundInputCheckbox.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(26, 201);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(315, 13);
this.label1.TabIndex = 6;
this.label1.Text = "When this is set, the client will continue to run when it loses focus";
//
// RunInBackgroundCheckbox
//
this.RunInBackgroundCheckbox.AutoSize = true;
this.RunInBackgroundCheckbox.Location = new System.Drawing.Point(6, 181);
this.RunInBackgroundCheckbox.Name = "RunInBackgroundCheckbox";
this.RunInBackgroundCheckbox.Size = new System.Drawing.Size(117, 17);
this.RunInBackgroundCheckbox.TabIndex = 5;
this.RunInBackgroundCheckbox.Text = "Run in background";
this.RunInBackgroundCheckbox.UseVisualStyleBackColor = true;
//
// ShowMenuInFullScreenCheckbox
//
this.ShowMenuInFullScreenCheckbox.AutoSize = true;
this.ShowMenuInFullScreenCheckbox.Location = new System.Drawing.Point(6, 40);
this.ShowMenuInFullScreenCheckbox.Name = "ShowMenuInFullScreenCheckbox";
this.ShowMenuInFullScreenCheckbox.Size = new System.Drawing.Size(147, 17);
this.ShowMenuInFullScreenCheckbox.TabIndex = 4;
this.ShowMenuInFullScreenCheckbox.Text = "Show Menu in FullScreen";
this.ShowMenuInFullScreenCheckbox.UseVisualStyleBackColor = true;
//
// SaveWindowPositionCheckbox
//
this.SaveWindowPositionCheckbox.AutoSize = true;
this.SaveWindowPositionCheckbox.Location = new System.Drawing.Point(6, 123);
this.SaveWindowPositionCheckbox.Name = "SaveWindowPositionCheckbox";
this.SaveWindowPositionCheckbox.Size = new System.Drawing.Size(133, 17);
this.SaveWindowPositionCheckbox.TabIndex = 3;
this.SaveWindowPositionCheckbox.Text = "Save Window Position";
this.SaveWindowPositionCheckbox.UseVisualStyleBackColor = true;
//
// EnableContextMenuCheckbox
//
this.EnableContextMenuCheckbox.AutoSize = true;
this.EnableContextMenuCheckbox.Location = new System.Drawing.Point(6, 63);
this.EnableContextMenuCheckbox.Name = "EnableContextMenuCheckbox";
this.EnableContextMenuCheckbox.Size = new System.Drawing.Size(128, 17);
this.EnableContextMenuCheckbox.TabIndex = 2;
this.EnableContextMenuCheckbox.Text = "Enable Context Menu";
this.EnableContextMenuCheckbox.UseVisualStyleBackColor = true;
//
// StartPausedCheckbox
//
this.StartPausedCheckbox.AutoSize = true;
this.StartPausedCheckbox.Location = new System.Drawing.Point(6, 100);
this.StartPausedCheckbox.Name = "StartPausedCheckbox";
this.StartPausedCheckbox.Size = new System.Drawing.Size(86, 17);
this.StartPausedCheckbox.TabIndex = 1;
this.StartPausedCheckbox.Text = "Start paused";
this.StartPausedCheckbox.UseVisualStyleBackColor = true;
//
// PauseWhenMenuActivatedCheckbox
//
this.PauseWhenMenuActivatedCheckbox.AutoSize = true;
this.PauseWhenMenuActivatedCheckbox.Location = new System.Drawing.Point(6, 17);
this.PauseWhenMenuActivatedCheckbox.Name = "PauseWhenMenuActivatedCheckbox";
this.PauseWhenMenuActivatedCheckbox.Size = new System.Drawing.Size(161, 17);
this.PauseWhenMenuActivatedCheckbox.TabIndex = 0;
this.PauseWhenMenuActivatedCheckbox.Text = "Pause when menu activated";
this.PauseWhenMenuActivatedCheckbox.UseVisualStyleBackColor = true;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.label12);
this.tabPage3.Controls.Add(this.label13);
this.tabPage3.Controls.Add(this.FrameAdvSkipLagCheckbox);
this.tabPage3.Controls.Add(this.label9);
this.tabPage3.Controls.Add(this.label10);
this.tabPage3.Controls.Add(this.BackupSRamCheckbox);
this.tabPage3.Controls.Add(this.label8);
this.tabPage3.Controls.Add(this.label7);
this.tabPage3.Controls.Add(this.ScreenshotInStatesCheckbox);
this.tabPage3.Controls.Add(this.label6);
this.tabPage3.Controls.Add(this.label5);
this.tabPage3.Controls.Add(this.BackupSavestatesCheckbox);
this.tabPage3.Controls.Add(this.label4);
this.tabPage3.Controls.Add(this.LogWindowAsConsoleCheckbox);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(386, 323);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "Advanced";
this.tabPage3.UseVisualStyleBackColor = true;
//
// BackupSRamCheckbox
//
this.BackupSRamCheckbox.AutoSize = true;
this.BackupSRamCheckbox.Location = new System.Drawing.Point(4, 195);
this.BackupSRamCheckbox.Name = "BackupSRamCheckbox";
this.BackupSRamCheckbox.Size = new System.Drawing.Size(108, 17);
this.BackupSRamCheckbox.TabIndex = 9;
this.BackupSRamCheckbox.Text = "Backup Saveram";
this.BackupSRamCheckbox.UseVisualStyleBackColor = true;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(24, 167);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(183, 13);
this.label8.TabIndex = 8;
this.label8.Text = "black screen on the frame it is loaded";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(24, 153);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(290, 13);
this.label7.TabIndex = 7;
this.label7.Text = "Saves a screenshot and loads it on loadstate so there isn\'t a";
//
// ScreenshotInStatesCheckbox
//
this.ScreenshotInStatesCheckbox.AutoSize = true;
this.ScreenshotInStatesCheckbox.Location = new System.Drawing.Point(4, 134);
this.ScreenshotInStatesCheckbox.Name = "ScreenshotInStatesCheckbox";
this.ScreenshotInStatesCheckbox.Size = new System.Drawing.Size(180, 17);
this.ScreenshotInStatesCheckbox.TabIndex = 6;
this.ScreenshotInStatesCheckbox.Text = "Save a screenshot in savestates";
this.ScreenshotInStatesCheckbox.UseVisualStyleBackColor = true;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(24, 107);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(99, 13);
this.label6.TabIndex = 5;
this.label6.Text = "before overwriting it";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(24, 94);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(292, 13);
this.label5.TabIndex = 4;
this.label5.Text = "When set, the client will make a backup copy of a savestate";
//
// BackupSavestatesCheckbox
//
this.BackupSavestatesCheckbox.AutoSize = true;
this.BackupSavestatesCheckbox.Location = new System.Drawing.Point(6, 74);
this.BackupSavestatesCheckbox.Name = "BackupSavestatesCheckbox";
this.BackupSavestatesCheckbox.Size = new System.Drawing.Size(119, 17);
this.BackupSavestatesCheckbox.TabIndex = 3;
this.BackupSavestatesCheckbox.Text = "Backup Savestates";
this.BackupSavestatesCheckbox.UseVisualStyleBackColor = true;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(24, 37);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(234, 13);
this.label4.TabIndex = 2;
this.label4.Text = "If off, the log window will be a dialog box instead";
//
// LogWindowAsConsoleCheckbox
//
this.LogWindowAsConsoleCheckbox.AutoSize = true;
this.LogWindowAsConsoleCheckbox.Location = new System.Drawing.Point(6, 17);
this.LogWindowAsConsoleCheckbox.Name = "LogWindowAsConsoleCheckbox";
this.LogWindowAsConsoleCheckbox.Size = new System.Drawing.Size(233, 17);
this.LogWindowAsConsoleCheckbox.TabIndex = 1;
this.LogWindowAsConsoleCheckbox.Text = "Create the log window as a console window";
this.LogWindowAsConsoleCheckbox.UseVisualStyleBackColor = true;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.label11);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(386, 313);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Recent Menus";
this.tabPage2.UseVisualStyleBackColor = true;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(24, 224);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(99, 13);
this.label9.TabIndex = 11;
this.label9.Text = "before overwriting it";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(24, 211);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(277, 13);
this.label10.TabIndex = 10;
this.label10.Text = "When set, the client will make a backup copy of saveram";
//
// FrameAdvSkipLagCheckbox
//
this.FrameAdvSkipLagCheckbox.AutoSize = true;
this.FrameAdvSkipLagCheckbox.Location = new System.Drawing.Point(6, 250);
this.FrameAdvSkipLagCheckbox.Name = "FrameAdvSkipLagCheckbox";
this.FrameAdvSkipLagCheckbox.Size = new System.Drawing.Size(241, 17);
this.FrameAdvSkipLagCheckbox.TabIndex = 12;
this.FrameAdvSkipLagCheckbox.Text = "Frame advance button skips non-input frames";
this.FrameAdvSkipLagCheckbox.UseVisualStyleBackColor = true;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(17, 16);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(35, 13);
this.label11.TabIndex = 0;
this.label11.Text = "To do";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(24, 283);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(231, 13);
this.label12.TabIndex = 14;
this.label12.Text = "frames in which no input was polled (lag frames)";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(24, 270);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(268, 13);
this.label13.TabIndex = 13;
this.label13.Text = "When enabled, the frame advance button will skip over";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(26, 299);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(303, 13);
this.label14.TabIndex = 12;
this.label14.Text = "Note: Requires closing and reopening EmuHawk to take effect";
//
// EmuHawkOptions
//
this.AcceptButton = this.OkBtn;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.CancelBtn;
this.ClientSize = new System.Drawing.Size(418, 402);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.CancelBtn);
this.Controls.Add(this.OkBtn);
this.Name = "EmuHawkOptions";
this.ShowIcon = false;
this.Text = "Gui Options";
this.Load += new System.EventHandler(this.GuiOptions_Load);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button OkBtn;
private System.Windows.Forms.Button CancelBtn;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.CheckBox StartPausedCheckbox;
private System.Windows.Forms.CheckBox PauseWhenMenuActivatedCheckbox;
private System.Windows.Forms.CheckBox EnableContextMenuCheckbox;
private System.Windows.Forms.CheckBox SaveWindowPositionCheckbox;
private System.Windows.Forms.CheckBox ShowMenuInFullScreenCheckbox;
private System.Windows.Forms.CheckBox RunInBackgroundCheckbox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox AcceptBackgroundInputCheckbox;
private System.Windows.Forms.CheckBox NeverAskSaveCheckbox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.CheckBox SingleInstanceModeCheckbox;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.CheckBox LogWindowAsConsoleCheckbox;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.CheckBox BackupSavestatesCheckbox;
private System.Windows.Forms.CheckBox ScreenshotInStatesCheckbox;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.CheckBox BackupSRamCheckbox;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.CheckBox FrameAdvSkipLagCheckbox;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
}
}

View File

@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
{
public partial class EmuHawkOptions : Form
{
// TODO: make sure these options are cleaned out of the mainform context menu
// TODO: put this in the context menu
public EmuHawkOptions()
{
InitializeComponent();
}
private void GuiOptions_Load(object sender, EventArgs e)
{
StartPausedCheckbox.Checked = Global.Config.StartPaused;
PauseWhenMenuActivatedCheckbox.Checked = Global.Config.PauseWhenMenuActivated;
EnableContextMenuCheckbox.Checked = Global.Config.ShowContextMenu;
SaveWindowPositionCheckbox.Checked = Global.Config.SaveWindowPosition;
ShowMenuInFullScreenCheckbox.Checked = Global.Config.ShowMenuInFullscreen;
RunInBackgroundCheckbox.Checked = Global.Config.RunInBackground;
AcceptBackgroundInputCheckbox.Checked = Global.Config.AcceptBackgroundInput;
NeverAskSaveCheckbox.Checked = Global.Config.SupressAskSave;
SingleInstanceModeCheckbox.Checked = Global.Config.SingleInstanceMode;
LogWindowAsConsoleCheckbox.Checked = Global.Config.WIN32_CONSOLE;
BackupSavestatesCheckbox.Checked = Global.Config.BackupSavestates;
ScreenshotInStatesCheckbox.Checked = Global.Config.SaveScreenshotWithStates;
BackupSRamCheckbox.Checked = Global.Config.BackupSaveram;
FrameAdvSkipLagCheckbox.Checked = Global.Config.SkipLagFrame;
if (LogConsole.ConsoleVisible)
{
LogWindowAsConsoleCheckbox.Enabled = false;
toolTip1.SetToolTip(
LogWindowAsConsoleCheckbox,
"This can not be chaned while the log window is open");
}
}
private void OkBtn_Click(object sender, EventArgs e)
{
Global.Config.StartPaused = StartPausedCheckbox.Checked;
Global.Config.PauseWhenMenuActivated = PauseWhenMenuActivatedCheckbox.Checked;
Global.Config.ShowContextMenu = EnableContextMenuCheckbox.Checked;
Global.Config.SaveWindowPosition = SaveWindowPositionCheckbox.Checked;
Global.Config.ShowMenuInFullscreen = ShowMenuInFullScreenCheckbox.Checked;
Global.Config.RunInBackground = RunInBackgroundCheckbox.Checked;
Global.Config.AcceptBackgroundInput = AcceptBackgroundInputCheckbox.Checked;
Global.Config.SupressAskSave = NeverAskSaveCheckbox.Checked;
Global.Config.SingleInstanceMode = SingleInstanceModeCheckbox.Checked;
Global.Config.WIN32_CONSOLE = LogWindowAsConsoleCheckbox.Checked;
Global.Config.BackupSavestates = BackupSavestatesCheckbox.Checked;
Global.Config.SaveScreenshotWithStates = ScreenshotInStatesCheckbox.Checked;
Global.Config.BackupSaveram = BackupSRamCheckbox.Checked;
Global.Config.SkipLagFrame = FrameAdvSkipLagCheckbox.Checked;
// Make sure this gets applied immediately
if (GlobalWin.MainForm.IsInFullscreen)
{
GlobalWin.MainForm.MainMenuStrip.Visible = Global.Config.ShowMenuInFullscreen;
}
Close();
DialogResult = DialogResult.OK;
GlobalWin.OSD.AddMessage("Custom configurations saved.");
}
private void CancelBtn_Click(object sender, EventArgs e)
{
Close();
DialogResult = DialogResult.Cancel;
GlobalWin.OSD.AddMessage("Customizing aborted.");
}
}
}

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>