1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 03:27:24 +08:00
osu-lazer/osu.Game/Skinning/ISkinSource.cs

32 lines
1.0 KiB
C#
Raw Normal View History

2018-03-20 15:26:36 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Framework.Audio.Sample;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Textures;
2018-03-20 15:26:36 +08:00
using OpenTK.Graphics;
namespace osu.Game.Skinning
{
/// <summary>
/// Provides access to skinnable elements.
/// </summary>
public interface ISkinSource
{
event Action SourceChanged;
Drawable GetDrawableComponent(string componentName);
Texture GetTexture(string componentName);
2018-03-20 15:26:36 +08:00
SampleChannel GetSample(string sampleName);
2018-03-22 16:32:05 +08:00
Color4? GetColour(string colourName);
TValue GetConfiguration<TConfiguration, TValue>(Func<TConfiguration, TValue> query) where TConfiguration : SkinConfiguration where TValue : class;
TValue? GetConfiguration<TConfiguration, TValue>(Func<TConfiguration, TValue?> query) where TConfiguration : SkinConfiguration where TValue : struct;
2018-03-20 15:26:36 +08:00
}
}