2019-01-20 07:08:38 +00:00
|
|
|
|
using System;
|
|
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
|
using RecrownedAthenaeum.SpecialTypes;
|
2019-01-27 23:39:18 +00:00
|
|
|
|
using RecrownedAthenaeum.UI.SkinSystem.Definitions;
|
2019-01-20 07:08:38 +00:00
|
|
|
|
|
2019-01-27 23:39:18 +00:00
|
|
|
|
namespace RecrownedAthenaeum.UI.SkinSystem
|
2019-01-20 07:08:38 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The output requirements of a skin. This allows for very customized skin systems if needed.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface ISkin
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The texture for the cursor.
|
|
|
|
|
/// </summary>
|
|
|
|
|
Texture2D CursorTexture { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Draws a region from the texture atlas.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="regionName">Region to draw.</param>
|
|
|
|
|
/// <param name="color">The color to tint the region.</param>
|
|
|
|
|
/// <param name="batch">The batch to use.</param>
|
|
|
|
|
/// <param name="destination">The destination to draw to.</param>
|
|
|
|
|
/// <param name="rotation">The rotation to use in radians.</param>
|
|
|
|
|
/// <param name="origin">The origin for the rotation.</param>
|
|
|
|
|
void Draw(string regionName, string color, SpriteBatch batch, Rectangle destination, float rotation = 0, Vector2 origin = default(Vector2));
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns a <see cref="Color"/> with given name of defined color;
|
2019-01-29 22:54:24 +00:00
|
|
|
|
/// Should use value "default" if <paramref name="name"/> is null.
|
2019-01-20 07:08:38 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">Name of defined color.</param>
|
|
|
|
|
/// <returns>The defined color based on the name given.</returns>
|
2019-01-29 22:54:24 +00:00
|
|
|
|
Color GetColor(string name = null);
|
2019-01-20 07:08:38 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns a <see cref="TextureAtlas.Region"/> with given name of region.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">Name of region.</param>
|
|
|
|
|
/// <returns>The region corresponding to the name.</returns>
|
|
|
|
|
TextureAtlas.Region GetTextureAtlasRegion(string name);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns the proper definition for the given parameters or throws exception in the case the requested definition does not exist.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="T">Convenience to cast to the needed definition type.</typeparam>
|
2019-01-29 01:43:41 +00:00
|
|
|
|
/// <param name="definitionName">The name of the definition. Default is null and will be replaced with "default" for name.</param>
|
2019-01-20 07:08:38 +00:00
|
|
|
|
/// <returns>The definition cast to T.</returns>
|
2019-01-29 22:22:14 +00:00
|
|
|
|
T ObtainDefinition<T>(string definitionName = null) where T : SkinDefinitionData;
|
2019-01-20 07:08:38 +00:00
|
|
|
|
}
|
|
|
|
|
}
|