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; /// Should use value "default" if is null. /// /// Name of defined color. /// The defined color based on the name given. Color GetColor(string name = null); /// /// Returns a with given name of region. /// /// Name of region. /// Whether or not the region is required. If true, it will throw an error if the region does not exist while if false, will return null if the region does not exist. /// The region corresponding to the name and may return null depending on if the region exists, and is required. TextureAtlas.Region GetTextureAtlasRegion(string name, bool required = false); /// /// 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. Default is null and will be replaced with "default" for name. /// The definition cast to T. T ObtainDefinition(string definitionName = null) where T : SkinDefinitionData; } }