mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 23:59:16 +08:00
Add skin components and interfaces
This commit is contained in:
parent
98acf1e31d
commit
60603d2918
19
osu.Game/Screens/Play/HUD/IComboCounter.cs
Normal file
19
osu.Game/Screens/Play/HUD/IComboCounter.cs
Normal 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; }
|
||||||
|
}
|
||||||
|
}
|
22
osu.Game/Skinning/HUDSkinComponent.cs
Normal file
22
osu.Game/Skinning/HUDSkinComponent.cs
Normal 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)));
|
||||||
|
}
|
||||||
|
}
|
10
osu.Game/Skinning/HUDSkinComponents.cs
Normal file
10
osu.Game/Skinning/HUDSkinComponents.cs
Normal 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
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user