Profile config - save and load the selected profile
This commit is contained in:
parent
0b35490b16
commit
c6d679c382
|
@ -100,6 +100,17 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public MovieEndAction MovieEndAction = MovieEndAction.Finish;
|
||||
|
||||
public enum ClientProfile
|
||||
{
|
||||
Unknown = 0,
|
||||
Casual = 1,
|
||||
Longplay = 2,
|
||||
Tas = 3,
|
||||
Custom = 99
|
||||
}
|
||||
|
||||
public ClientProfile SelectedProfile = ClientProfile.Unknown;
|
||||
|
||||
// N64
|
||||
public bool N64UseCircularAnalogConstraint = true;
|
||||
|
||||
|
|
|
@ -20,10 +20,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public partial class ProfileConfig : Form
|
||||
{
|
||||
// TODO:
|
||||
// Save the profile selected to Global.Config (Casual is the default)
|
||||
// Default the dropdown to the current profile selected instead of empty
|
||||
|
||||
public ProfileConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
@ -35,6 +31,21 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
ProfileSelectComboBox.Items.Remove("Custom Profile");
|
||||
}
|
||||
|
||||
switch (Global.Config.SelectedProfile)
|
||||
{
|
||||
default:
|
||||
case Config.ClientProfile.Custom: // For now
|
||||
case Config.ClientProfile.Casual:
|
||||
ProfileSelectComboBox.SelectedItem = "Casual Gaming";
|
||||
break;
|
||||
case Config.ClientProfile.Longplay:
|
||||
ProfileSelectComboBox.SelectedItem = "Longplays";
|
||||
break;
|
||||
case Config.ClientProfile.Tas:
|
||||
ProfileSelectComboBox.SelectedItem = "Tool-assisted Speedruns";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void OkBtn_Click(object sender, EventArgs e)
|
||||
|
@ -210,6 +221,21 @@ namespace BizHawk.Client.EmuHawk
|
|||
//DisplayProfileSettingBoxes(true);
|
||||
}
|
||||
|
||||
switch(ProfileSelectComboBox.SelectedItem.ToString())
|
||||
{
|
||||
default:
|
||||
case "Custom Profile": // For now
|
||||
case "Casual Gaming":
|
||||
Global.Config.SelectedProfile = Config.ClientProfile.Casual;
|
||||
break;
|
||||
case "Longplays":
|
||||
Global.Config.SelectedProfile = Config.ClientProfile.Longplay;
|
||||
break;
|
||||
case "Tool-assisted Speedruns":
|
||||
Global.Config.SelectedProfile = Config.ClientProfile.Tas;
|
||||
break;
|
||||
}
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue