Add skin components and interfaces

This commit is contained in:
Dean Herbert 2020-10-14 16:45:40 +09:00
parent 98acf1e31d
commit 60603d2918
3 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,19 @@
// 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.Framework.Graphics;
namespace osu.Game.Screens.Play.HUD
{
/// <summary>
/// An interface providing a set of methods to update a combo counter.
/// </summary>
public interface IComboCounter : IDrawable
{
/// <summary>
/// The current combo to be displayed.
/// </summary>
Bindable<int> Current { get; }
}
}

View File

@ -0,0 +1,22 @@
// 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 System.Linq;
namespace osu.Game.Skinning
{
public class HUDSkinComponent : ISkinComponent
{
public readonly HUDSkinComponents Component;
public HUDSkinComponent(HUDSkinComponents component)
{
Component = component;
}
protected virtual string ComponentName => Component.ToString();
public string LookupName =>
string.Join("/", new[] { "HUD", ComponentName }.Where(s => !string.IsNullOrEmpty(s)));
}
}

View File

@ -0,0 +1,10 @@
// 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.
namespace osu.Game.Skinning
{
public enum HUDSkinComponents
{
ComboCounter
}
}