diff --git a/BizHawk.MultiClient/config/ControllerConfig/ControllerConfigPanel.cs b/BizHawk.MultiClient/config/ControllerConfig/ControllerConfigPanel.cs index 941ed1b5cd..ed6f618ff9 100644 --- a/BizHawk.MultiClient/config/ControllerConfig/ControllerConfigPanel.cs +++ b/BizHawk.MultiClient/config/ControllerConfig/ControllerConfigPanel.cs @@ -178,10 +178,7 @@ namespace BizHawk.MultiClient protected void restoreDefaultsToolStripMenuItem_Click(object sender, EventArgs e) { - // this is a TODO: we have no concept of default values in our config system at the moment - // so for the moment, "defaults" = "no binds at all" - RealConfigObject.Clear(); - SetWidgetStrings(); + //TODO } } } diff --git a/BizHawk.MultiClient/config/NewControllerConfig.Designer.cs b/BizHawk.MultiClient/config/NewControllerConfig.Designer.cs index e26490db41..81ffda9c48 100644 --- a/BizHawk.MultiClient/config/NewControllerConfig.Designer.cs +++ b/BizHawk.MultiClient/config/NewControllerConfig.Designer.cs @@ -41,7 +41,6 @@ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.buttonLoadDefaults = new System.Windows.Forms.Button(); - this.buttonSaveAllDefaults = new System.Windows.Forms.Button(); this.tabControl1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); @@ -186,17 +185,6 @@ this.buttonLoadDefaults.UseVisualStyleBackColor = true; this.buttonLoadDefaults.Click += new System.EventHandler(this.buttonLoadDefaults_Click); // - // buttonSaveAllDefaults - // - this.buttonSaveAllDefaults.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonSaveAllDefaults.Location = new System.Drawing.Point(534, 485); - this.buttonSaveAllDefaults.Name = "buttonSaveAllDefaults"; - this.buttonSaveAllDefaults.Size = new System.Drawing.Size(75, 23); - this.buttonSaveAllDefaults.TabIndex = 9; - this.buttonSaveAllDefaults.Text = "Save All"; - this.buttonSaveAllDefaults.UseVisualStyleBackColor = true; - this.buttonSaveAllDefaults.Click += new System.EventHandler(this.buttonSaveAllDefaults_Click); - // // NewControllerConfig // this.AcceptButton = this.buttonOK; @@ -204,7 +192,6 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.buttonCancel; this.ClientSize = new System.Drawing.Size(864, 515); - this.Controls.Add(this.buttonSaveAllDefaults); this.Controls.Add(this.buttonLoadDefaults); this.Controls.Add(this.checkBoxUDLR); this.Controls.Add(this.tableLayoutPanel1); @@ -237,7 +224,6 @@ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Button buttonLoadDefaults; - private System.Windows.Forms.Button buttonSaveAllDefaults; private System.Windows.Forms.TabPage tabPage3; } } \ No newline at end of file diff --git a/BizHawk.MultiClient/config/NewControllerConfig.cs b/BizHawk.MultiClient/config/NewControllerConfig.cs index af8a3144cd..b6e6dd2c20 100644 --- a/BizHawk.MultiClient/config/NewControllerConfig.cs +++ b/BizHawk.MultiClient/config/NewControllerConfig.cs @@ -36,8 +36,6 @@ namespace BizHawk.MultiClient.config private NewControllerConfig() { InitializeComponent(); - if (!MainForm.INTERIM) - buttonSaveAllDefaults.Hide(); } delegate Control PanelCreator(Dictionary settings, List buttons, Size size); @@ -221,6 +219,12 @@ namespace BizHawk.MultiClient.config } private void buttonLoadDefaults_Click(object sender, EventArgs e) + { + RestoreDefaults(); + Close(); + } + + public void RestoreDefaults() { // this is not clever. i'm going to replace it with something more clever @@ -228,7 +232,7 @@ namespace BizHawk.MultiClient.config cd = ConfigService.Load(ControlDefaultPath, cd); Dictionary settings; Dictionary asettings; - + if (cd.AllTrollers.TryGetValue(ControllerType, out settings)) { Global.Config.AllTrollers[ControllerType] = settings; @@ -255,23 +259,6 @@ namespace BizHawk.MultiClient.config { Global.Config.AllTrollersAnalog[ControllerType].Clear(); } - - Close(); - } - - private void buttonSaveAllDefaults_Click(object sender, EventArgs e) - { - var result = MessageBox.Show("OK to save defaults for ALL cores?", "Bizhawk", MessageBoxButtons.YesNo); - if (result == DialogResult.Yes) - { - ControlDefaults cd = new ControlDefaults - { - AllTrollers = Global.Config.AllTrollers, - AllTrollersAutoFire = Global.Config.AllTrollersAutoFire, - AllTrollersAnalog = Global.Config.AllTrollersAnalog - }; - ConfigService.Save(ControlDefaultPath, cd); - } } class ControlDefaults