// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using System.Linq; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Game.Extensions; using osu.Game.Rulesets; namespace osu.Game.Skinning { /// /// Denotes a container which can house s. /// public interface ISkinnableTarget : IDrawable { /// /// The definition of this target. /// GlobalSkinComponentLookup.LookupType Target { get; } /// /// A bindable list of components which are being tracked by this skinnable target. /// IBindableList Components { get; } /// /// Serialise all children as . /// /// The serialised content. IEnumerable CreateSkinnableInfo() => Components.Select(d => ((Drawable)d).CreateSkinnableInfo()); /// /// Reload this target from the current skin. /// void Reload(); /// /// Reload this target from the provided skinnable information. /// void Reload(SkinnableInfo[] skinnableInfo); /// /// Add a new skinnable component to this target. /// /// The component to add. void Add(ISkinnableDrawable drawable); /// /// Remove an existing skinnable component from this target. /// /// The component to remove. void Remove(ISkinnableDrawable component); } }