2020-10-14 07:46:13 +00:00
|
|
|
// 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
|
|
|
|
{
|
2020-10-15 06:37:40 +00:00
|
|
|
public Bindable<int> Current { get; } = new Bindable<int>();
|
|
|
|
|
2020-10-14 07:46:13 +00:00
|
|
|
public SkinnableComboCounter()
|
2020-10-15 06:37:40 +00:00
|
|
|
: base(new HUDSkinComponent(HUDSkinComponents.ComboCounter), skinComponent => new DefaultComboCounter())
|
2020-10-14 07:46:13 +00:00
|
|
|
{
|
2020-10-14 08:20:10 +00:00
|
|
|
CentreComponent = false;
|
2020-10-14 07:46:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private IComboCounter skinnedCounter;
|
|
|
|
|
|
|
|
protected override void SkinChanged(ISkinSource skin, bool allowFallback)
|
|
|
|
{
|
|
|
|
base.SkinChanged(skin, allowFallback);
|
|
|
|
|
2020-10-14 14:52:58 +00:00
|
|
|
skinnedCounter = Drawable as IComboCounter;
|
|
|
|
skinnedCounter?.Current.BindTo(Current);
|
2020-10-14 07:46:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|