convenience constructors added for skin serializable.
This commit is contained in:
parent
6df8386841
commit
cf9c27456d
@ -1,4 +1,5 @@
|
|||||||
using RecrownedAthenaeum.UI.Skin.Definitions;
|
using Microsoft.Xna.Framework;
|
||||||
|
using RecrownedAthenaeum.UI.Skin.Definitions;
|
||||||
|
|
||||||
namespace RecrownedAthenaeum.Data
|
namespace RecrownedAthenaeum.Data
|
||||||
{
|
{
|
||||||
@ -66,7 +67,21 @@ namespace RecrownedAthenaeum.Data
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// RGBA data of this color.
|
/// RGBA data of this color.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int r, g, b, a;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -82,6 +97,17 @@ namespace RecrownedAthenaeum.Data
|
|||||||
/// The skin definition data.
|
/// The skin definition data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ISkinDefinitionData skin;
|
public ISkinDefinitionData skin;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets values for data.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">The name to be referenced by.</param>
|
||||||
|
/// <param name="skinDefinitionData">The skin data.</param>
|
||||||
|
public DefinitionData(string name, ISkinDefinitionData skinDefinitionData)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
skin = skinDefinitionData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user