1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 12:02:54 +08:00
osu-lazer/osu.Game/Skinning/SkinUtils.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
913 B
C#
Raw Normal View History

2019-09-05 16:00:43 +08:00
// 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.
2022-06-17 15:37:17 +08:00
#nullable disable
using osu.Framework.Bindables;
namespace osu.Game.Skinning
{
/// <summary>
/// Contains helper methods to assist in implementing <see cref="ISkin"/>s.
/// </summary>
public static class SkinUtils
{
/// <summary>
/// Converts an <see cref="object"/> to a <see cref="Bindable{TValue}"/>. Used for returning configuration values of specific types.
/// </summary>
/// <param name="value">The value.</param>
/// <typeparam name="TValue">The type of value <paramref name="value"/>, and the type of the resulting bindable.</typeparam>
/// <returns>The resulting bindable.</returns>
public static Bindable<TValue> As<TValue>(object value) => (Bindable<TValue>)value;
}
}