diff --git a/osu.Game/Overlays/Options/General/LoginOptions.cs b/osu.Game/Overlays/Options/General/LoginOptions.cs index 0c4a48b89b..a6e354bbcb 100644 --- a/osu.Game/Overlays/Options/General/LoginOptions.cs +++ b/osu.Game/Overlays/Options/General/LoginOptions.cs @@ -83,6 +83,22 @@ namespace osu.Game.Overlays.Options.General private CheckBoxOption saveUsername; private CheckBoxOption savePassword; + private void eventPassword() + { + if (savePassword.State == CheckBoxState.Checked) + { + saveUsername.State = CheckBoxState.Checked; + } + } + private void eventUsername() + { + if (savePassword.State == CheckBoxState.Checked) + { + if(saveUsername.State == CheckBoxState.Unchecked) + savePassword.State = CheckBoxState.Unchecked; + } + } + private void performLogin() { if (!string.IsNullOrEmpty(username.Text) && !string.IsNullOrEmpty(password.Text)) @@ -135,6 +151,8 @@ namespace osu.Game.Overlays.Options.General //Action = registerLink } }; + config.GetBindable(OsuConfig.SavePassword).ValueChanged += delegate { eventPassword(); }; + config.GetBindable(OsuConfig.SaveUsername).ValueChanged += delegate { eventUsername(); }; } } }