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;
|
2018-03-20 15:28:39 +08:00
|
|
|
|
using osu.Framework.Graphics.Textures;
|
2018-03-20 15:26:36 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Skinning
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Provides access to skinnable elements.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface ISkinSource
|
|
|
|
|
{
|
|
|
|
|
event Action SourceChanged;
|
|
|
|
|
|
|
|
|
|
Drawable GetDrawableComponent(string componentName);
|
|
|
|
|
|
2018-03-20 15:28:39 +08:00
|
|
|
|
Texture GetTexture(string componentName);
|
|
|
|
|
|
2018-03-20 15:26:36 +08:00
|
|
|
|
SampleChannel GetSample(string sampleName);
|
|
|
|
|
|
2018-03-22 17:50:19 +08:00
|
|
|
|
TValue GetValue<TConfiguration, TValue>(Func<TConfiguration, TValue> query) where TConfiguration : SkinConfiguration where TValue : class;
|
2018-03-22 17:10:28 +08:00
|
|
|
|
|
2018-03-22 17:50:19 +08:00
|
|
|
|
TValue? GetValue<TConfiguration, TValue>(Func<TConfiguration, TValue?> query) where TConfiguration : SkinConfiguration where TValue : struct;
|
2018-03-20 15:26:36 +08:00
|
|
|
|
}
|
|
|
|
|
}
|