1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-19 11:23:23 +08:00

Merge pull request #10105 from smoogipoo/rollingcounter-currentvalue

Fix broken RollingCounter current value implementation
This commit is contained in:
Dean Herbert 2020-09-09 21:35:01 +09:00 committed by GitHub
commit 2019b3bd14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,16 +9,20 @@ using System;
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics.UserInterface;
namespace osu.Game.Graphics.UserInterface
{
public abstract class RollingCounter<T> : Container
public abstract class RollingCounter<T> : Container, IHasCurrentValue<T>
where T : struct, IEquatable<T>
{
/// <summary>
/// The current value.
/// </summary>
public Bindable<T> Current = new Bindable<T>();
private readonly BindableWithCurrent<T> current = new BindableWithCurrent<T>();
public Bindable<T> Current
{
get => current.Current;
set => current.Current = value;
}
private SpriteText displayedCountSpriteText;