mirror of
https://github.com/ppy/osu.git
synced 2025-03-16 00:37:19 +08:00
Fix regression in ModSettingsChangeTracker
This commit is contained in:
parent
1b49e92e99
commit
c0b388cd74
@ -119,19 +119,19 @@ namespace osu.Game.Overlays.Settings
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
// IMPORTANT: all bindable logic is in constructor intentionally to support "CreateSettingsControls" being used in a context it is
|
||||||
private void load()
|
|
||||||
{
|
|
||||||
// all bindable logic is in constructor intentionally to support "CreateSettingsControls" being used in a context it is
|
|
||||||
// never loaded, but requires bindable storage.
|
// never loaded, but requires bindable storage.
|
||||||
if (controlWithCurrent == null)
|
if (controlWithCurrent == null)
|
||||||
throw new ArgumentException(@$"Control created via {nameof(CreateControl)} must implement {nameof(IHasCurrentValue<T>)}");
|
throw new ArgumentException(@$"Control created via {nameof(CreateControl)} must implement {nameof(IHasCurrentValue<T>)}");
|
||||||
|
|
||||||
controlWithCurrent.Current.ValueChanged += _ => SettingChanged?.Invoke();
|
controlWithCurrent.Current.ValueChanged += _ => SettingChanged?.Invoke();
|
||||||
controlWithCurrent.Current.DisabledChanged += _ => updateDisabled();
|
controlWithCurrent.Current.DisabledChanged += _ => updateDisabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
// intentionally done before LoadComplete to avoid overhead.
|
// intentionally done before LoadComplete to avoid overhead.
|
||||||
if (ShowsDefaultIndicator)
|
if (ShowsDefaultIndicator)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user