mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Moved Config logic to OsuConfigManager
This commit is contained in:
@ -168,9 +168,23 @@ namespace osu.Game.Configuration
|
||||
Set(OsuConfig.CanForceOptimusCompatibility, true);
|
||||
Set(OsuConfig.ConfineMouse, Get<bool>(OsuConfig.ConfineMouseToFullscreen) ?
|
||||
ConfineMouseMode.Fullscreen : ConfineMouseMode.Never);
|
||||
|
||||
GetBindable<bool>(OsuConfig.SavePassword).ValueChanged += delegate { eventPassword(); };
|
||||
GetBindable<bool>(OsuConfig.SaveUsername).ValueChanged += delegate { eventUsername(); };
|
||||
#pragma warning restore CS0612 // Type or member is obsolete
|
||||
}
|
||||
|
||||
private void eventPassword()
|
||||
{
|
||||
if ((GetBindable<bool>(OsuConfig.SavePassword) == true) && (GetBindable<bool>(OsuConfig.SaveUsername) == false))
|
||||
Set(OsuConfig.SaveUsername, true);
|
||||
}
|
||||
private void eventUsername()
|
||||
{
|
||||
if ((GetBindable<bool>(OsuConfig.SaveUsername) == false) && (GetBindable<bool>(OsuConfig.SavePassword) == true))
|
||||
Set(OsuConfig.SavePassword, false);
|
||||
}
|
||||
|
||||
//todo: make a UnicodeString class/struct rather than requiring this helper method.
|
||||
public string GetUnicodeString(string nonunicode, string unicode)
|
||||
=> Get<bool>(OsuConfig.ShowUnicode) ? unicode ?? nonunicode : nonunicode ?? unicode;
|
||||
|
Reference in New Issue
Block a user