mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 21:07:18 +09:00
Added Events for checkboxes
This commit is contained in:
parent
9f202ecba8
commit
ba1d0b3a84
@ -83,6 +83,22 @@ namespace osu.Game.Overlays.Options.General
|
|||||||
private CheckBoxOption saveUsername;
|
private CheckBoxOption saveUsername;
|
||||||
private CheckBoxOption savePassword;
|
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()
|
private void performLogin()
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(username.Text) && !string.IsNullOrEmpty(password.Text))
|
if (!string.IsNullOrEmpty(username.Text) && !string.IsNullOrEmpty(password.Text))
|
||||||
@ -135,6 +151,8 @@ namespace osu.Game.Overlays.Options.General
|
|||||||
//Action = registerLink
|
//Action = registerLink
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
config.GetBindable<bool>(OsuConfig.SavePassword).ValueChanged += delegate { eventPassword(); };
|
||||||
|
config.GetBindable<bool>(OsuConfig.SaveUsername).ValueChanged += delegate { eventUsername(); };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user