mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 12:43:16 +08:00
Tidy up SkinnableComboCounter class slightly
This commit is contained in:
parent
b06f59ffdc
commit
d5f2aab52e
@ -2,15 +2,16 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
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), createDefault)
|
||||
: base(new HUDSkinComponent(HUDSkinComponents.ComboCounter), skinComponent => new DefaultComboCounter())
|
||||
{
|
||||
CentreComponent = false;
|
||||
}
|
||||
@ -24,9 +25,5 @@ namespace osu.Game.Screens.Play.HUD
|
||||
skinnedCounter = Drawable as IComboCounter;
|
||||
skinnedCounter?.Current.BindTo(Current);
|
||||
}
|
||||
|
||||
private static Drawable createDefault(ISkinComponent skinComponent) => new DefaultComboCounter();
|
||||
|
||||
public Bindable<int> Current { get; } = new Bindable<int>();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user