diff --git a/BizHawk.Client.Common/RecentFiles.cs b/BizHawk.Client.Common/RecentFiles.cs index 1fd28233c0..131d66035d 100644 --- a/BizHawk.Client.Common/RecentFiles.cs +++ b/BizHawk.Client.Common/RecentFiles.cs @@ -17,7 +17,7 @@ namespace BizHawk.Client.Common MAX_RECENT_FILES = max; } - public int MAX_RECENT_FILES { get; private set; } + public int MAX_RECENT_FILES { get; set; } public bool AutoLoad { get; set; } [JsonIgnore] diff --git a/BizHawk.Client.Common/config/Config.cs b/BizHawk.Client.Common/config/Config.cs index ff6797f412..4359396f58 100644 --- a/BizHawk.Client.Common/config/Config.cs +++ b/BizHawk.Client.Common/config/Config.cs @@ -62,7 +62,7 @@ namespace BizHawk.Client.Common public int TargetDisplayFilter = 0; public int DispFinalFilter = 0; public string DispUserFilterPath = ""; - public RecentFiles RecentRoms = new RecentFiles(8); + public RecentFiles RecentRoms = new RecentFiles(10); public bool PauseWhenMenuActivated = true; public bool SaveWindowPosition = true; public bool StartPaused = false; diff --git a/BizHawk.Client.EmuHawk/config/GuiOptions.Designer.cs b/BizHawk.Client.EmuHawk/config/GuiOptions.Designer.cs index 26583756c1..6c9fb2ccef 100644 --- a/BizHawk.Client.EmuHawk/config/GuiOptions.Designer.cs +++ b/BizHawk.Client.EmuHawk/config/GuiOptions.Designer.cs @@ -33,6 +33,7 @@ this.CancelBtn = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.label14 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.SingleInstanceModeCheckbox = new System.Windows.Forms.CheckBox(); this.NeverAskSaveCheckbox = new System.Windows.Forms.CheckBox(); @@ -46,6 +47,11 @@ this.StartPausedCheckbox = new System.Windows.Forms.CheckBox(); this.PauseWhenMenuActivatedCheckbox = new System.Windows.Forms.CheckBox(); this.tabPage3 = new System.Windows.Forms.TabPage(); + this.label12 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.FrameAdvSkipLagCheckbox = new System.Windows.Forms.CheckBox(); + this.label9 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); this.BackupSRamCheckbox = new System.Windows.Forms.CheckBox(); this.label8 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); @@ -56,18 +62,43 @@ 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.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.RecentRomsNumeric = new System.Windows.Forms.NumericUpDown(); + this.RecentGroupBox = new System.Windows.Forms.GroupBox(); + this.RecentMoviesNumeric = new System.Windows.Forms.NumericUpDown(); + this.label15 = new System.Windows.Forms.Label(); + this.RecentTblNumeric = new System.Windows.Forms.NumericUpDown(); + this.label16 = new System.Windows.Forms.Label(); + this.RecentCheatsNumeric = new System.Windows.Forms.NumericUpDown(); + this.label17 = new System.Windows.Forms.Label(); + this.RecentPceCDLNumeric = new System.Windows.Forms.NumericUpDown(); + this.label18 = new System.Windows.Forms.Label(); + this.RecentSearchesNumeric = new System.Windows.Forms.NumericUpDown(); + this.label20 = new System.Windows.Forms.Label(); + this.RecentWatchesNumeric = new System.Windows.Forms.NumericUpDown(); + this.label21 = new System.Windows.Forms.Label(); + this.RecentLuaSessionsNumeric = new System.Windows.Forms.NumericUpDown(); + this.label22 = new System.Windows.Forms.Label(); + this.RecentLuaScriptNumeric = new System.Windows.Forms.NumericUpDown(); + this.label23 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.DecreaseRecentBtn = new System.Windows.Forms.Button(); + this.IncreaseRecentBtn = new System.Windows.Forms.Button(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage3.SuspendLayout(); this.tabPage2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.RecentRomsNumeric)).BeginInit(); + this.RecentGroupBox.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.RecentMoviesNumeric)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentTblNumeric)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentCheatsNumeric)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentPceCDLNumeric)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentSearchesNumeric)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentWatchesNumeric)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentLuaSessionsNumeric)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentLuaScriptNumeric)).BeginInit(); this.SuspendLayout(); // // OkBtn @@ -130,6 +161,15 @@ this.tabPage1.Text = "General"; this.tabPage1.UseVisualStyleBackColor = true; // + // 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"; + // // label3 // this.label3.AutoSize = true; @@ -155,7 +195,7 @@ 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.TabIndex = 6; this.NeverAskSaveCheckbox.Text = "Never be asked to save changes"; this.NeverAskSaveCheckbox.UseVisualStyleBackColor = true; // @@ -174,7 +214,7 @@ 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.TabIndex = 8; this.AcceptBackgroundInputCheckbox.Text = "Accept background input"; this.AcceptBackgroundInputCheckbox.UseVisualStyleBackColor = true; // @@ -193,7 +233,7 @@ 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.TabIndex = 7; this.RunInBackgroundCheckbox.Text = "Run in background"; this.RunInBackgroundCheckbox.UseVisualStyleBackColor = true; // @@ -203,7 +243,7 @@ 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.TabIndex = 1; this.ShowMenuInFullScreenCheckbox.Text = "Show Menu in FullScreen"; this.ShowMenuInFullScreenCheckbox.UseVisualStyleBackColor = true; // @@ -213,7 +253,7 @@ 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.TabIndex = 5; this.SaveWindowPositionCheckbox.Text = "Save Window Position"; this.SaveWindowPositionCheckbox.UseVisualStyleBackColor = true; // @@ -233,7 +273,7 @@ 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.TabIndex = 4; this.StartPausedCheckbox.Text = "Start paused"; this.StartPausedCheckbox.UseVisualStyleBackColor = true; // @@ -270,6 +310,52 @@ this.tabPage3.Text = "Advanced"; this.tabPage3.UseVisualStyleBackColor = true; // + // 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"; + // + // 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; + // + // 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"; + // // BackupSRamCheckbox // this.BackupSRamCheckbox.AutoSize = true; @@ -357,78 +443,357 @@ // // tabPage2 // - this.tabPage2.Controls.Add(this.label11); + this.tabPage2.Controls.Add(this.IncreaseRecentBtn); + this.tabPage2.Controls.Add(this.DecreaseRecentBtn); + this.tabPage2.Controls.Add(this.RecentGroupBox); 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.Size = new System.Drawing.Size(386, 323); 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.Location = new System.Drawing.Point(15, 31); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(35, 13); + this.label11.Size = new System.Drawing.Size(34, 13); this.label11.TabIndex = 0; - this.label11.Text = "To do"; + this.label11.Text = "Roms"; // - // label12 + // RecentRomsNumeric // - 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)"; + this.RecentRomsNumeric.Location = new System.Drawing.Point(124, 27); + this.RecentRomsNumeric.Maximum = new decimal(new int[] { + 30, + 0, + 0, + 0}); + this.RecentRomsNumeric.Minimum = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.RecentRomsNumeric.Name = "RecentRomsNumeric"; + this.RecentRomsNumeric.Size = new System.Drawing.Size(43, 20); + this.RecentRomsNumeric.TabIndex = 1; + this.RecentRomsNumeric.Value = new decimal(new int[] { + 8, + 0, + 0, + 0}); // - // label13 + // RecentGroupBox // - 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"; + this.RecentGroupBox.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.RecentGroupBox.Controls.Add(this.label19); + this.RecentGroupBox.Controls.Add(this.RecentSearchesNumeric); + this.RecentGroupBox.Controls.Add(this.label20); + this.RecentGroupBox.Controls.Add(this.RecentWatchesNumeric); + this.RecentGroupBox.Controls.Add(this.label21); + this.RecentGroupBox.Controls.Add(this.RecentLuaSessionsNumeric); + this.RecentGroupBox.Controls.Add(this.label22); + this.RecentGroupBox.Controls.Add(this.RecentLuaScriptNumeric); + this.RecentGroupBox.Controls.Add(this.label23); + this.RecentGroupBox.Controls.Add(this.RecentPceCDLNumeric); + this.RecentGroupBox.Controls.Add(this.label18); + this.RecentGroupBox.Controls.Add(this.RecentTblNumeric); + this.RecentGroupBox.Controls.Add(this.label16); + this.RecentGroupBox.Controls.Add(this.RecentCheatsNumeric); + this.RecentGroupBox.Controls.Add(this.label17); + this.RecentGroupBox.Controls.Add(this.RecentMoviesNumeric); + this.RecentGroupBox.Controls.Add(this.label15); + this.RecentGroupBox.Controls.Add(this.RecentRomsNumeric); + this.RecentGroupBox.Controls.Add(this.label11); + this.RecentGroupBox.Location = new System.Drawing.Point(15, 37); + this.RecentGroupBox.Name = "RecentGroupBox"; + this.RecentGroupBox.Size = new System.Drawing.Size(365, 280); + this.RecentGroupBox.TabIndex = 2; + this.RecentGroupBox.TabStop = false; + this.RecentGroupBox.Text = "Max number of recent files"; // - // label14 + // RecentMoviesNumeric // - 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"; + this.RecentMoviesNumeric.Location = new System.Drawing.Point(124, 53); + this.RecentMoviesNumeric.Maximum = new decimal(new int[] { + 30, + 0, + 0, + 0}); + this.RecentMoviesNumeric.Minimum = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.RecentMoviesNumeric.Name = "RecentMoviesNumeric"; + this.RecentMoviesNumeric.Size = new System.Drawing.Size(43, 20); + this.RecentMoviesNumeric.TabIndex = 2; + this.RecentMoviesNumeric.Value = new decimal(new int[] { + 8, + 0, + 0, + 0}); + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(15, 57); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(41, 13); + this.label15.TabIndex = 2; + this.label15.Text = "Movies"; + // + // RecentTblNumeric + // + this.RecentTblNumeric.Location = new System.Drawing.Point(124, 118); + this.RecentTblNumeric.Maximum = new decimal(new int[] { + 30, + 0, + 0, + 0}); + this.RecentTblNumeric.Minimum = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.RecentTblNumeric.Name = "RecentTblNumeric"; + this.RecentTblNumeric.Size = new System.Drawing.Size(43, 20); + this.RecentTblNumeric.TabIndex = 4; + this.RecentTblNumeric.Value = new decimal(new int[] { + 8, + 0, + 0, + 0}); + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Location = new System.Drawing.Point(15, 109); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(56, 13); + this.label16.TabIndex = 6; + this.label16.Text = "Hex Editor"; + // + // RecentCheatsNumeric + // + this.RecentCheatsNumeric.Location = new System.Drawing.Point(124, 79); + this.RecentCheatsNumeric.Maximum = new decimal(new int[] { + 30, + 0, + 0, + 0}); + this.RecentCheatsNumeric.Minimum = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.RecentCheatsNumeric.Name = "RecentCheatsNumeric"; + this.RecentCheatsNumeric.Size = new System.Drawing.Size(43, 20); + this.RecentCheatsNumeric.TabIndex = 3; + this.RecentCheatsNumeric.Value = new decimal(new int[] { + 8, + 0, + 0, + 0}); + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(15, 83); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(40, 13); + this.label17.TabIndex = 4; + this.label17.Text = "Cheats"; + // + // RecentPceCDLNumeric + // + this.RecentPceCDLNumeric.Location = new System.Drawing.Point(124, 142); + this.RecentPceCDLNumeric.Maximum = new decimal(new int[] { + 30, + 0, + 0, + 0}); + this.RecentPceCDLNumeric.Minimum = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.RecentPceCDLNumeric.Name = "RecentPceCDLNumeric"; + this.RecentPceCDLNumeric.Size = new System.Drawing.Size(43, 20); + this.RecentPceCDLNumeric.TabIndex = 5; + this.RecentPceCDLNumeric.Value = new decimal(new int[] { + 8, + 0, + 0, + 0}); + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Location = new System.Drawing.Point(15, 146); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(103, 13); + this.label18.TabIndex = 8; + this.label18.Text = "PCE code/data logs"; + // + // RecentSearchesNumeric + // + this.RecentSearchesNumeric.Location = new System.Drawing.Point(276, 105); + this.RecentSearchesNumeric.Maximum = new decimal(new int[] { + 30, + 0, + 0, + 0}); + this.RecentSearchesNumeric.Minimum = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.RecentSearchesNumeric.Name = "RecentSearchesNumeric"; + this.RecentSearchesNumeric.Size = new System.Drawing.Size(43, 20); + this.RecentSearchesNumeric.TabIndex = 9; + this.RecentSearchesNumeric.Value = new decimal(new int[] { + 8, + 0, + 0, + 0}); + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(200, 109); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(52, 13); + this.label20.TabIndex = 16; + this.label20.Text = "Searches"; + // + // RecentWatchesNumeric + // + this.RecentWatchesNumeric.Location = new System.Drawing.Point(276, 79); + this.RecentWatchesNumeric.Maximum = new decimal(new int[] { + 30, + 0, + 0, + 0}); + this.RecentWatchesNumeric.Minimum = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.RecentWatchesNumeric.Name = "RecentWatchesNumeric"; + this.RecentWatchesNumeric.Size = new System.Drawing.Size(43, 20); + this.RecentWatchesNumeric.TabIndex = 8; + this.RecentWatchesNumeric.Value = new decimal(new int[] { + 8, + 0, + 0, + 0}); + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(200, 83); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(50, 13); + this.label21.TabIndex = 14; + this.label21.Text = "Watches"; + // + // RecentLuaSessionsNumeric + // + this.RecentLuaSessionsNumeric.Location = new System.Drawing.Point(276, 53); + this.RecentLuaSessionsNumeric.Maximum = new decimal(new int[] { + 30, + 0, + 0, + 0}); + this.RecentLuaSessionsNumeric.Minimum = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.RecentLuaSessionsNumeric.Name = "RecentLuaSessionsNumeric"; + this.RecentLuaSessionsNumeric.Size = new System.Drawing.Size(43, 20); + this.RecentLuaSessionsNumeric.TabIndex = 7; + this.RecentLuaSessionsNumeric.Value = new decimal(new int[] { + 8, + 0, + 0, + 0}); + // + // label22 + // + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(200, 57); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(70, 13); + this.label22.TabIndex = 12; + this.label22.Text = "Lua Sessions"; + // + // RecentLuaScriptNumeric + // + this.RecentLuaScriptNumeric.Location = new System.Drawing.Point(276, 27); + this.RecentLuaScriptNumeric.Maximum = new decimal(new int[] { + 30, + 0, + 0, + 0}); + this.RecentLuaScriptNumeric.Minimum = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.RecentLuaScriptNumeric.Name = "RecentLuaScriptNumeric"; + this.RecentLuaScriptNumeric.Size = new System.Drawing.Size(43, 20); + this.RecentLuaScriptNumeric.TabIndex = 6; + this.RecentLuaScriptNumeric.Value = new decimal(new int[] { + 8, + 0, + 0, + 0}); + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(200, 31); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(60, 13); + this.label23.TabIndex = 10; + this.label23.Text = "Lua Scripts"; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(15, 122); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(90, 13); + this.label19.TabIndex = 18; + this.label19.Text = "Translation tables"; + // + // DecreaseRecentBtn + // + this.DecreaseRecentBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.DecreaseRecentBtn.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Back; + this.DecreaseRecentBtn.Location = new System.Drawing.Point(335, 14); + this.DecreaseRecentBtn.Name = "DecreaseRecentBtn"; + this.DecreaseRecentBtn.Size = new System.Drawing.Size(23, 23); + this.DecreaseRecentBtn.TabIndex = 3; + this.DecreaseRecentBtn.UseVisualStyleBackColor = true; + this.DecreaseRecentBtn.Click += new System.EventHandler(this.DecreaseRecentBtn_Click); + // + // IncreaseRecentBtn + // + this.IncreaseRecentBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.IncreaseRecentBtn.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Forward; + this.IncreaseRecentBtn.Location = new System.Drawing.Point(357, 14); + this.IncreaseRecentBtn.Name = "IncreaseRecentBtn"; + this.IncreaseRecentBtn.Size = new System.Drawing.Size(23, 23); + this.IncreaseRecentBtn.TabIndex = 5; + this.IncreaseRecentBtn.UseVisualStyleBackColor = true; + this.IncreaseRecentBtn.Click += new System.EventHandler(this.IncreaseRecentBtn_Click); // // EmuHawkOptions // @@ -450,7 +815,17 @@ this.tabPage3.ResumeLayout(false); this.tabPage3.PerformLayout(); this.tabPage2.ResumeLayout(false); - this.tabPage2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.RecentRomsNumeric)).EndInit(); + this.RecentGroupBox.ResumeLayout(false); + this.RecentGroupBox.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.RecentMoviesNumeric)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentTblNumeric)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentCheatsNumeric)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentPceCDLNumeric)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentSearchesNumeric)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentWatchesNumeric)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentLuaSessionsNumeric)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.RecentLuaScriptNumeric)).EndInit(); this.ResumeLayout(false); } @@ -492,5 +867,26 @@ private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label14; + private System.Windows.Forms.GroupBox RecentGroupBox; + private System.Windows.Forms.NumericUpDown RecentSearchesNumeric; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.NumericUpDown RecentWatchesNumeric; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.NumericUpDown RecentLuaSessionsNumeric; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.NumericUpDown RecentLuaScriptNumeric; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.NumericUpDown RecentPceCDLNumeric; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.NumericUpDown RecentTblNumeric; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.NumericUpDown RecentCheatsNumeric; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.NumericUpDown RecentMoviesNumeric; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.NumericUpDown RecentRomsNumeric; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.Button IncreaseRecentBtn; + private System.Windows.Forms.Button DecreaseRecentBtn; } } \ No newline at end of file diff --git a/BizHawk.Client.EmuHawk/config/GuiOptions.cs b/BizHawk.Client.EmuHawk/config/GuiOptions.cs index e2600fcac6..4d915e1053 100644 --- a/BizHawk.Client.EmuHawk/config/GuiOptions.cs +++ b/BizHawk.Client.EmuHawk/config/GuiOptions.cs @@ -45,6 +45,17 @@ namespace BizHawk.Client.EmuHawk LogWindowAsConsoleCheckbox, "This can not be chaned while the log window is open"); } + + // Recent + RecentRomsNumeric.Value = Global.Config.RecentRoms.MAX_RECENT_FILES; + RecentMoviesNumeric.Value = Global.Config.RecentMovies.MAX_RECENT_FILES; + RecentCheatsNumeric.Value = Global.Config.RecentCheats.MAX_RECENT_FILES; + RecentTblNumeric.Value = Global.Config.RecentTables.MAX_RECENT_FILES; + RecentPceCDLNumeric.Value = Global.Config.RecentPceCdlFiles.MAX_RECENT_FILES; + RecentLuaScriptNumeric.Value = Global.Config.RecentLua.MAX_RECENT_FILES; + RecentLuaSessionsNumeric.Value = Global.Config.RecentLuaSession.MAX_RECENT_FILES; + RecentWatchesNumeric.Value = Global.Config.RecentWatches.MAX_RECENT_FILES; + RecentSearchesNumeric.Value = Global.Config.RecentSearches.MAX_RECENT_FILES; } private void OkBtn_Click(object sender, EventArgs e) @@ -71,6 +82,17 @@ namespace BizHawk.Client.EmuHawk GlobalWin.MainForm.MainMenuStrip.Visible = Global.Config.ShowMenuInFullscreen; } + //Recent + Global.Config.RecentRoms.MAX_RECENT_FILES = (int)RecentRomsNumeric.Value; + Global.Config.RecentMovies.MAX_RECENT_FILES = (int)RecentMoviesNumeric.Value; + Global.Config.RecentCheats.MAX_RECENT_FILES = (int)RecentCheatsNumeric.Value; + Global.Config.RecentTables.MAX_RECENT_FILES = (int)RecentTblNumeric.Value; + Global.Config.RecentPceCdlFiles.MAX_RECENT_FILES = (int)RecentPceCDLNumeric.Value; + Global.Config.RecentLua.MAX_RECENT_FILES = (int)RecentLuaScriptNumeric.Value; + Global.Config.RecentLuaSession.MAX_RECENT_FILES = (int)RecentLuaSessionsNumeric.Value; + Global.Config.RecentWatches.MAX_RECENT_FILES = (int)RecentWatchesNumeric.Value; + Global.Config.RecentSearches.MAX_RECENT_FILES = (int)RecentSearchesNumeric.Value; + Close(); DialogResult = DialogResult.OK; GlobalWin.OSD.AddMessage("Custom configurations saved."); @@ -82,5 +104,33 @@ namespace BizHawk.Client.EmuHawk DialogResult = DialogResult.Cancel; GlobalWin.OSD.AddMessage("Customizing aborted."); } + + private void DecreaseRecentBtn_Click(object sender, EventArgs e) + { + RecentGroupBox.Controls + .OfType() + .ToList() + .ForEach(n => + { + if (n.Value > n.Minimum) + { + n.Value--; + } + }); + } + + private void IncreaseRecentBtn_Click(object sender, EventArgs e) + { + RecentGroupBox.Controls + .OfType() + .ToList() + .ForEach(n => + { + if (n.Value < n.Maximum) + { + n.Value++; + } + }); + } } }