diff --git a/BizHawk.Client.EmuHawk/config/ProfileConfig.Designer.cs b/BizHawk.Client.EmuHawk/config/ProfileConfig.Designer.cs index 3e227b079c..29b69c719a 100644 --- a/BizHawk.Client.EmuHawk/config/ProfileConfig.Designer.cs +++ b/BizHawk.Client.EmuHawk/config/ProfileConfig.Designer.cs @@ -30,12 +30,16 @@ { this.OkBtn = new System.Windows.Forms.Button(); this.CancelBtn = new System.Windows.Forms.Button(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); - this.checkBox1 = new System.Windows.Forms.CheckBox(); - this.checkBox2 = new System.Windows.Forms.CheckBox(); - this.checkBox3 = new System.Windows.Forms.CheckBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.richTextBox1 = new System.Windows.Forms.RichTextBox(); + this.ProfileSelectComboBox = new System.Windows.Forms.ComboBox(); + this.SaveScreenshotStatesCheckBox = new System.Windows.Forms.CheckBox(); + this.SaveLargeScreenshotStatesCheckBox = new System.Windows.Forms.CheckBox(); + this.AllowUDLRCheckBox = new System.Windows.Forms.CheckBox(); + this.ProfileDialogHelpTexBox = new System.Windows.Forms.RichTextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.GeneralOptionsLabel = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.comboBox2 = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // OkBtn @@ -63,68 +67,120 @@ // // comboBox1 // - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Items.AddRange(new object[] { + this.ProfileSelectComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.ProfileSelectComboBox.FormattingEnabled = true; + this.ProfileSelectComboBox.Items.AddRange(new object[] { "Casual Gaming", "Tool-assisted Speedruns", "Longplays", - "Custom.."}); - this.comboBox1.Location = new System.Drawing.Point(12, 12); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(140, 21); - this.comboBox1.TabIndex = 2; - this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); + "Custom Profile"}); + this.ProfileSelectComboBox.Location = new System.Drawing.Point(22, 20); + this.ProfileSelectComboBox.Name = "comboBox1"; + this.ProfileSelectComboBox.Size = new System.Drawing.Size(156, 21); + this.ProfileSelectComboBox.TabIndex = 2; + this.ProfileSelectComboBox.SelectedIndexChanged += new System.EventHandler(this.ProfileSelectComboBox_SelectedIndexChanged); // // checkBox1 // - this.checkBox1.AutoSize = true; - this.checkBox1.Location = new System.Drawing.Point(12, 67); - this.checkBox1.Name = "checkBox1"; - this.checkBox1.Size = new System.Drawing.Size(166, 17); - this.checkBox1.TabIndex = 4; - this.checkBox1.Text = "Save Screenshot With States"; - this.checkBox1.UseVisualStyleBackColor = true; - this.checkBox1.MouseHover += new System.EventHandler(this.checkBox1_MouseHover); + this.SaveScreenshotStatesCheckBox.AutoSize = true; + this.SaveScreenshotStatesCheckBox.Location = new System.Drawing.Point(12, 67); + this.SaveScreenshotStatesCheckBox.Name = "checkBox1"; + this.SaveScreenshotStatesCheckBox.Size = new System.Drawing.Size(166, 17); + this.SaveScreenshotStatesCheckBox.TabIndex = 4; + this.SaveScreenshotStatesCheckBox.Text = "Save Screenshot With States"; + this.SaveScreenshotStatesCheckBox.UseVisualStyleBackColor = true; + this.SaveScreenshotStatesCheckBox.Visible = false; + this.SaveScreenshotStatesCheckBox.MouseHover += new System.EventHandler(this.SaveScreenshotStatesCheckBox_MouseHover); // // checkBox2 // - this.checkBox2.AutoSize = true; - this.checkBox2.Location = new System.Drawing.Point(12, 90); - this.checkBox2.Name = "checkBox2"; - this.checkBox2.Size = new System.Drawing.Size(196, 17); - this.checkBox2.TabIndex = 5; - this.checkBox2.Text = "Save Large Screenshot With States"; - this.checkBox2.UseVisualStyleBackColor = true; - this.checkBox2.MouseHover += new System.EventHandler(this.checkBox2_MouseHover); + this.SaveLargeScreenshotStatesCheckBox.AutoSize = true; + this.SaveLargeScreenshotStatesCheckBox.Location = new System.Drawing.Point(12, 90); + this.SaveLargeScreenshotStatesCheckBox.Name = "checkBox2"; + this.SaveLargeScreenshotStatesCheckBox.Size = new System.Drawing.Size(196, 17); + this.SaveLargeScreenshotStatesCheckBox.TabIndex = 5; + this.SaveLargeScreenshotStatesCheckBox.Text = "Save Large Screenshot With States"; + this.SaveLargeScreenshotStatesCheckBox.UseVisualStyleBackColor = true; + this.SaveLargeScreenshotStatesCheckBox.Visible = false; + this.SaveLargeScreenshotStatesCheckBox.MouseHover += new System.EventHandler(this.SaveLargeScreenshotStatesCheckBox_MouseHover); // // checkBox3 // - this.checkBox3.AutoSize = true; - this.checkBox3.Location = new System.Drawing.Point(12, 113); - this.checkBox3.Name = "checkBox3"; - this.checkBox3.Size = new System.Drawing.Size(111, 17); - this.checkBox3.TabIndex = 6; - this.checkBox3.Text = "Allow U+D or L+R"; - this.checkBox3.UseVisualStyleBackColor = true; - this.checkBox3.MouseHover += new System.EventHandler(this.checkBox3_MouseHover); - // - // groupBox1 - // - this.groupBox1.Location = new System.Drawing.Point(4, 47); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(207, 91); - this.groupBox1.TabIndex = 7; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "General Options"; + this.AllowUDLRCheckBox.AutoSize = true; + this.AllowUDLRCheckBox.Location = new System.Drawing.Point(12, 113); + this.AllowUDLRCheckBox.Name = "checkBox3"; + this.AllowUDLRCheckBox.Size = new System.Drawing.Size(111, 17); + this.AllowUDLRCheckBox.TabIndex = 6; + this.AllowUDLRCheckBox.Text = "Allow U+D or L+R"; + this.AllowUDLRCheckBox.UseVisualStyleBackColor = true; + this.AllowUDLRCheckBox.Visible = false; + this.AllowUDLRCheckBox.MouseHover += new System.EventHandler(this.AllowUDLRCheckBox_MouseHover); // // richTextBox1 // - this.richTextBox1.Location = new System.Drawing.Point(217, 47); - this.richTextBox1.Name = "richTextBox1"; - this.richTextBox1.ReadOnly = true; - this.richTextBox1.Size = new System.Drawing.Size(165, 91); - this.richTextBox1.TabIndex = 8; - this.richTextBox1.Text = ""; + this.ProfileDialogHelpTexBox.Location = new System.Drawing.Point(184, 12); + this.ProfileDialogHelpTexBox.Name = "richTextBox1"; + this.ProfileDialogHelpTexBox.ReadOnly = true; + this.ProfileDialogHelpTexBox.Size = new System.Drawing.Size(198, 126); + this.ProfileDialogHelpTexBox.TabIndex = 8; + this.ProfileDialogHelpTexBox.Text = "Options:\nCasual Gaming - All about performance!\n\nTool-Assisted Speedruns - Maximu" + + "m Accuracy!\n\nLongplays - Stability is the key!"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(21, 6); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(75, 13); + this.label1.TabIndex = 9; + this.label1.Text = "Profile Options"; + // + // label2 + // + this.GeneralOptionsLabel.AutoSize = true; + this.GeneralOptionsLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.GeneralOptionsLabel.Location = new System.Drawing.Point(9, 51); + this.GeneralOptionsLabel.Name = "label2"; + this.GeneralOptionsLabel.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.GeneralOptionsLabel.Size = new System.Drawing.Size(83, 13); + this.GeneralOptionsLabel.TabIndex = 10; + this.GeneralOptionsLabel.Text = "General Options"; + this.GeneralOptionsLabel.Visible = false; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(13, 195); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(93, 13); + this.label3.TabIndex = 11; + this.label3.Text = "N64 Core Settings"; + this.label3.Visible = false; + // + // comboBox2 + // + this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox2.FormattingEnabled = true; + this.comboBox2.Items.AddRange(new object[] { + "Pure Interpreter", + "Interpreter", + "Dynarec"}); + this.comboBox2.Location = new System.Drawing.Point(109, 211); + this.comboBox2.Name = "comboBox2"; + this.comboBox2.Size = new System.Drawing.Size(99, 21); + this.comboBox2.TabIndex = 12; + this.comboBox2.Visible = false; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(19, 214); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(56, 13); + this.label4.TabIndex = 13; + this.label4.Text = "Core Type"; + this.label4.Visible = false; // // ProfileConfig // @@ -133,14 +189,18 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.CancelBtn; this.ClientSize = new System.Drawing.Size(385, 372); - this.Controls.Add(this.richTextBox1); - this.Controls.Add(this.checkBox3); - this.Controls.Add(this.checkBox2); - this.Controls.Add(this.checkBox1); - this.Controls.Add(this.comboBox1); + this.Controls.Add(this.label4); + this.Controls.Add(this.comboBox2); + this.Controls.Add(this.label3); + this.Controls.Add(this.GeneralOptionsLabel); + this.Controls.Add(this.label1); + this.Controls.Add(this.ProfileDialogHelpTexBox); + this.Controls.Add(this.AllowUDLRCheckBox); + this.Controls.Add(this.SaveLargeScreenshotStatesCheckBox); + this.Controls.Add(this.SaveScreenshotStatesCheckBox); + this.Controls.Add(this.ProfileSelectComboBox); this.Controls.Add(this.CancelBtn); this.Controls.Add(this.OkBtn); - this.Controls.Add(this.groupBox1); this.Name = "ProfileConfig"; this.ShowIcon = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; @@ -155,11 +215,15 @@ private System.Windows.Forms.Button OkBtn; private System.Windows.Forms.Button CancelBtn; - private System.Windows.Forms.ComboBox comboBox1; - private System.Windows.Forms.CheckBox checkBox1; - private System.Windows.Forms.CheckBox checkBox2; - private System.Windows.Forms.CheckBox checkBox3; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.RichTextBox richTextBox1; + private System.Windows.Forms.ComboBox ProfileSelectComboBox; + private System.Windows.Forms.CheckBox SaveScreenshotStatesCheckBox; + private System.Windows.Forms.CheckBox SaveLargeScreenshotStatesCheckBox; + private System.Windows.Forms.CheckBox AllowUDLRCheckBox; + private System.Windows.Forms.RichTextBox ProfileDialogHelpTexBox; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label GeneralOptionsLabel; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.Label label4; } } \ No newline at end of file diff --git a/BizHawk.Client.EmuHawk/config/ProfileConfig.cs b/BizHawk.Client.EmuHawk/config/ProfileConfig.cs index 6a5368b882..4f4317f0a9 100644 --- a/BizHawk.Client.EmuHawk/config/ProfileConfig.cs +++ b/BizHawk.Client.EmuHawk/config/ProfileConfig.cs @@ -6,6 +6,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using BizHawk.Client.Common; namespace BizHawk.Client.EmuHawk { @@ -18,13 +19,16 @@ namespace BizHawk.Client.EmuHawk private void ProfileConfig_Load(object sender, EventArgs e) { - } private void OkBtn_Click(object sender, EventArgs e) { /* Saving logic goes here */ - + if (ProfileSelectComboBox.SelectedIndex == 3) + { + //If custom profile, check all the checkboxes + } + //Save to config.ini DialogResult = DialogResult.OK; Close(); } @@ -35,39 +39,69 @@ namespace BizHawk.Client.EmuHawk Close(); } - private void checkBox1_MouseHover(object sender, EventArgs e) + private void ProfileSelectComboBox_SelectedIndexChanged(object sender, EventArgs e) { - richTextBox1.Text = "Save Screenshot with Savestates: \r\n * Required for TASing \r\n * Not Recommended for \r\n Longplays or Casual Gaming"; - } - private void checkBox2_MouseHover(object sender, EventArgs e) - { - richTextBox1.Text = "Save Large Screenshot With States: \r\n * Required for TASing \r\n * Not Recommended for \r\n Longplays or Casual Gaming"; - } - private void checkBox3_MouseHover(object sender, EventArgs e) - { - richTextBox1.Text = "All Up+Down or Left+Right: \r\n * Useful for TASing \r\n * Unchecked for Casual Gaming \r\n * Unknown for longplays"; + if (ProfileSelectComboBox.SelectedIndex == 0) //Casual Gaming + { + DisplayProfileSettingBoxes(false); + Global.Config.SaveLargeScreenshotWithStates = false; + Global.Config.SaveScreenshotWithStates = false; + Global.Config.AllowUD_LR = false; + } + else if (ProfileSelectComboBox.SelectedIndex == 1) //TAS + { + DisplayProfileSettingBoxes(false); + Global.Config.SaveLargeScreenshotWithStates = true; + Global.Config.SaveScreenshotWithStates = true; + Global.Config.AllowUD_LR = true; + } + else if (ProfileSelectComboBox.SelectedIndex == 2) //Long Plays + { + DisplayProfileSettingBoxes(false); + Global.Config.SaveLargeScreenshotWithStates = false; + Global.Config.SaveScreenshotWithStates = false; + Global.Config.AllowUD_LR = false; + } + else if (ProfileSelectComboBox.SelectedIndex == 3) //custom + { + DisplayProfileSettingBoxes(true); + } } - private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) + private void DisplayProfileSettingBoxes(bool cProfile) { - if (comboBox1.SelectedIndex == 0) //Casual Gaming + if (cProfile == true) { - checkBox1.Checked = false; - checkBox2.Checked = false; - checkBox3.Checked = false; + ProfileDialogHelpTexBox.Location = new System.Drawing.Point(217, 12); + ProfileDialogHelpTexBox.Size = new System.Drawing.Size(165, 126); + SaveScreenshotStatesCheckBox.Visible = true; + SaveLargeScreenshotStatesCheckBox.Visible = true; + AllowUDLRCheckBox.Visible = true; + GeneralOptionsLabel.Visible = true; } - else if (comboBox1.SelectedIndex == 1) //TAS + else if (cProfile == false) { - checkBox1.Checked = true; - checkBox2.Checked = true; - checkBox3.Checked = true; - } - else if (comboBox1.SelectedIndex == 2) //Long Plays - { - checkBox1.Checked = false; - checkBox2.Checked = false; - checkBox3.Checked = false; + ProfileDialogHelpTexBox.Location = new System.Drawing.Point(184, 12); + ProfileDialogHelpTexBox.Size = new System.Drawing.Size(198, 126); + ProfileDialogHelpTexBox.Text = "Options: \r\nCasual Gaming - All about performance! \r\n\nTool-Assisted Speedruns - Maximum Accuracy! \r\n\nLongplays - Stability is the key!"; + SaveScreenshotStatesCheckBox.Visible = false; + SaveLargeScreenshotStatesCheckBox.Visible = false; + AllowUDLRCheckBox.Visible = false; + GeneralOptionsLabel.Visible = false; } } + + private void SaveScreenshotStatesCheckBox_MouseHover(object sender, EventArgs e) + { + ProfileDialogHelpTexBox.Text = "Save Screenshot with Savestates: \r\n * Required for TASing \r\n * Not Recommended for \r\n Longplays or Casual Gaming"; + } + private void SaveLargeScreenshotStatesCheckBox_MouseHover(object sender, EventArgs e) + { + ProfileDialogHelpTexBox.Text = "Save Large Screenshot With States: \r\n * Required for TASing \r\n * Not Recommended for \r\n Longplays or Casual Gaming"; + } + private void AllowUDLRCheckBox_MouseHover(object sender, EventArgs e) + { + ProfileDialogHelpTexBox.Text = "All Up+Down or Left+Right: \r\n * Useful for TASing \r\n * Unchecked for Casual Gaming \r\n * Unknown for longplays"; + } } }