2019-11-24 20:49:53 +00:00
using RecrownedAthenaeum.UI.SkinSystem.Definitions ;
2019-01-15 05:38:20 +00:00
2019-01-20 07:07:52 +00:00
namespace RecrownedAthenaeum.Data
2019-01-15 05:38:20 +00:00
{
2019-01-15 23:03:17 +00:00
/// <summary>
/// Data transfer object for game skins.
/// </summary>
2019-01-15 05:38:20 +00:00
public class SkinData
{
2019-01-15 23:03:17 +00:00
/// <summary>
2019-01-20 07:07:52 +00:00
/// Holds metadata.
2019-01-16 01:34:02 +00:00
/// </summary>
2019-01-20 07:07:52 +00:00
public class Metadata
{
/// <summary>
/// Author name.
/// </summary>
public string author ;
/// <summary>
/// Description of skin.
/// </summary>
public string description ;
/// <summary>
/// Name of skin.
/// </summary>
public string skinName ;
}
2019-01-16 01:34:02 +00:00
/// <summary>
2019-01-20 07:07:52 +00:00
/// The metadata for the skin file.
2019-01-16 01:34:02 +00:00
/// </summary>
2019-01-20 07:07:52 +00:00
public Metadata metadata ;
2019-01-16 01:34:02 +00:00
/// <summary>
/// The name of the atlas with extension.
2019-01-15 23:03:17 +00:00
/// </summary>
2019-01-15 05:38:20 +00:00
public string nameOfTextureAtlas ;
2019-01-20 07:07:52 +00:00
/// <summary>
/// Name of the region or file designating the cursor. If there is an extension, will check for file first then texture atlas. Otherwise, will just check region.
/// </summary>
public string cursorTextureName ;
2019-01-15 23:03:17 +00:00
/// <summary>
/// The color data containing the name of the color, and red, green, and blue values for the color.
/// </summary>
2019-01-15 05:38:20 +00:00
public ColorData [ ] colors ;
2019-01-16 01:34:02 +00:00
2019-01-15 23:03:17 +00:00
/// <summary>
/// The skin definitions containing a name for the definition, and the definition itself.
/// </summary>
2019-01-15 05:38:20 +00:00
public DefinitionData [ ] definitions ;
2019-01-15 23:03:17 +00:00
/// <summary>
/// Color data for data transfer.
/// </summary>
2019-01-16 01:34:02 +00:00
public struct ColorData
2019-01-15 05:38:20 +00:00
{
2019-01-15 23:03:17 +00:00
/// <summary>
/// Name of color to be referenced by.
/// </summary>
public string name ;
/// <summary>
2019-01-16 01:34:02 +00:00
/// RGBA data of this color.
2019-01-15 23:03:17 +00:00
/// </summary>
2019-01-27 04:11:01 +00:00
public byte r , g , b , a ;
/// <summary>
/// Sets values for data.
/// </summary>
/// <param name="name">the name to be referenced by.</param>
/// <param name="color">The color value <paramref name="name"/> represents.</param>
public ColorData ( string name , Color color )
{
this . name = name ;
r = color . R ;
g = color . G ;
b = color . B ;
a = color . A ;
}
2019-01-15 05:38:20 +00:00
}
2019-01-15 23:03:17 +00:00
/// <summary>
/// Definition data for data transfer.
/// </summary>
2019-01-16 01:34:02 +00:00
public struct DefinitionData
2019-01-15 05:38:20 +00:00
{
2019-01-15 23:03:17 +00:00
/// <summary>
/// Name of definition to be referenced by.
/// </summary>
public string name ;
/// <summary>
/// The skin definition data.
/// </summary>
2019-01-29 22:22:14 +00:00
public SkinDefinitionData skin ;
2019-01-27 04:11:01 +00:00
/// <summary>
/// Sets values for data.
/// </summary>
/// <param name="name">The name to be referenced by.</param>
/// <param name="skinDefinitionData">The skin data.</param>
2019-01-29 22:22:14 +00:00
public DefinitionData ( string name , SkinDefinitionData skinDefinitionData )
2019-01-27 04:11:01 +00:00
{
this . name = name ;
skin = skinDefinitionData ;
}
2019-01-15 05:38:20 +00:00
}
}
}