using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using RecrownedAthenaeum.SpecialTypes; using RecrownedAthenaeum.UI.SkinSystem.Definitions; namespace RecrownedAthenaeum.UI.SkinSystem { /// /// The output requirements of a skin. This allows for very customized skin systems if needed. /// public interface ISkin { /// /// The texture for the cursor. /// Texture2D CursorTexture { get; } /// /// Draws a region from the texture atlas. /// /// Region to draw. /// The color to tint the region. /// The batch to use. /// The destination to draw to. /// The rotation to use in radians. /// The origin for the rotation. void Draw(string regionName, string color, SpriteBatch batch, Rectangle destination, float rotation = 0, Vector2 origin = default(Vector2)); /// /// Returns a with given name of defined color; /// /// Name of defined color. /// The defined color based on the name given. Color GetColor(string name); /// /// Returns a with given name of region. /// /// Name of region. /// The region corresponding to the name. TextureAtlas.Region GetTextureAtlasRegion(string name); /// /// Returns an of the given name and type. /// /// Name of definition of the /// The UIModule the definition defines. /// The interface for the definition. ISkinDefinitionData ObtainDefinition(string definitionName, Type type); /// /// Returns the default of the given parameters. /// /// The type of definition the default should be coming from. /// The default definition for the given type. ISkinDefinitionData ObtainDefinition(Type type); /// /// Returns the proper definition for the given parameters or throws exception in the case the requested definition does not exist. /// /// Convenience to cast to the needed definition type. /// The name of the definition. /// UIModule type the definition defines. /// The definition cast to T. T ObtainDefinition(string definitionName, Type type) where T : ISkinDefinitionData; /// /// Returns the default definition. /// /// Convenience to cast to T. /// The type of the UIModule to retrieve the default from. /// The default definition for the given type. T ObtainDefinition(Type type) where T : ISkinDefinitionData; } }