mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 23:47:24 +08:00
30 lines
927 B
C#
30 lines
927 B
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using osu.Framework.Bindables;
|
|
using osu.Game.Skinning;
|
|
|
|
namespace osu.Game.Screens.Play.HUD
|
|
{
|
|
public class SkinnableComboCounter : SkinnableDrawable, IComboCounter
|
|
{
|
|
public Bindable<int> Current { get; } = new Bindable<int>();
|
|
|
|
public SkinnableComboCounter()
|
|
: base(new HUDSkinComponent(HUDSkinComponents.ComboCounter), skinComponent => new DefaultComboCounter())
|
|
{
|
|
CentreComponent = false;
|
|
}
|
|
|
|
private IComboCounter skinnedCounter;
|
|
|
|
protected override void SkinChanged(ISkinSource skin, bool allowFallback)
|
|
{
|
|
base.SkinChanged(skin, allowFallback);
|
|
|
|
skinnedCounter = Drawable as IComboCounter;
|
|
skinnedCounter?.Current.BindTo(Current);
|
|
}
|
|
}
|
|
}
|