Fix incorrect implementation of IHasCurrentValue in FooterButtonFreeMods

This commit is contained in:
Dean Herbert 2023-10-06 16:51:40 +09:00
parent f2e56bbb65
commit 1d7b8ea21a
No known key found for this signature in database

View File

@ -23,7 +23,18 @@ namespace osu.Game.Screens.OnlinePlay
{
public partial class FooterButtonFreeMods : FooterButton, IHasCurrentValue<IReadOnlyList<Mod>>
{
public Bindable<IReadOnlyList<Mod>> Current { get; set; } = new BindableWithCurrent<IReadOnlyList<Mod>>();
private readonly BindableWithCurrent<IReadOnlyList<Mod>> current = new BindableWithCurrent<IReadOnlyList<Mod>>(Array.Empty<Mod>());
public Bindable<IReadOnlyList<Mod>> Current
{
get => current.Current;
set
{
ArgumentNullException.ThrowIfNull(value);
current.Current = value;
}
}
private OsuSpriteText count = null!;