// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osu.Framework.Graphics.UserInterface; using osu.Framework.Utils; namespace osu.Framework.Bindables { public interface IBindableWithCurrent : IBindable, IHasCurrentValue { /// /// Creates a new according to the specified value type. /// If the value type is one supported by the , an instance of will be returned. /// Otherwise an instance of will be returned instead. /// public static IBindableWithCurrent Create() { if (Validation.IsSupportedBindableNumberType()) return (IBindableWithCurrent)Activator.CreateInstance(typeof(BindableNumberWithCurrent<>).MakeGenericType(typeof(T)), default(T)); return new BindableWithCurrent(); } } }