1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 20:32:55 +08:00
osu-lazer/osu.Game/Screens/Play/HUD/ArgonComboCounter.cs

38 lines
1.2 KiB
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.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Configuration;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Screens.Play.HUD
{
public partial class ArgonComboCounter : ComboCounter
{
[SettingSource("Wireframe opacity", "Controls the opacity of the wire frames behind the digits.")]
public BindableFloat WireframeOpacity { get; } = new BindableFloat(0.4f)
{
Precision = 0.01f,
MinValue = 0,
MaxValue = 1,
};
[BackgroundDependencyLoader]
private void load(ScoreProcessor scoreProcessor)
{
Current.BindTo(scoreProcessor.Combo);
}
protected override LocalisableString FormatCount(int count) => $@"{count}x";
protected override IHasText CreateText() => new ArgonCounterTextComponent(Anchor.TopLeft, "COMBO")
{
WireframeOpacity = { BindTarget = WireframeOpacity },
};
}
}