1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 14:50:54 +08:00

Simplify classic default flow

This commit is contained in:
Salman Alshamrani
2025-12-18 20:03:38 -05:00
Unverified
parent a82d0c3b51
commit 276757315f
+2 -12
View File
@@ -105,23 +105,13 @@ namespace osu.Game.Overlays.Settings
#region ISettingsItem
public bool HasClassicDefault { get; private set; }
private Action? applyClassicDefault;
public bool HasClassicDefault => ApplyClassicDefault != null;
/// <summary>
/// If set, this setting is considered as having a "classic" default value,
/// and this is the function for overwriting the control with that value.
/// </summary>
public Action? ApplyClassicDefault
{
get => applyClassicDefault;
set
{
applyClassicDefault = value;
HasClassicDefault = true;
}
}
public Action? ApplyClassicDefault { get; set; }
void ISettingsItem.ApplyClassicDefault() => ApplyClassicDefault?.Invoke();