diff --git a/RecrownedAthenaeum.Pipeline/RecrownedAthenaeum.Pipeline.csproj b/RecrownedAthenaeum.Pipeline/RecrownedAthenaeum.Pipeline.csproj
index f3bf100..4988288 100644
--- a/RecrownedAthenaeum.Pipeline/RecrownedAthenaeum.Pipeline.csproj
+++ b/RecrownedAthenaeum.Pipeline/RecrownedAthenaeum.Pipeline.csproj
@@ -21,6 +21,7 @@
DEBUG;TRACE
prompt
4
+ bin\Debug\RecrownedAthenaeum.Pipeline.xml
pdbonly
diff --git a/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasData.cs b/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasData.cs
index 482815a..b6da21c 100644
--- a/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasData.cs
+++ b/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasData.cs
@@ -3,35 +3,78 @@ using RecrownedAthenaeum.Pipeline.NinePatch;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
+ ///
+ /// Data transfer object for a texture atlas.
+ ///
public class TextureAtlasData
{
+ ///
+ /// Contains the regions of the texture atlas.
+ ///
public AtlasRegionData[] regions;
+ ///
+ /// The name of the file.
+ ///
public string textureName;
+ ///
+ /// Creates the atlas given the regions and the file name of the texture file to be used.
+ ///
+ ///
+ ///
public TextureAtlasData(string textureName, AtlasRegionData[] regions)
{
this.regions = regions;
this.textureName = textureName;
}
+ ///
+ /// Data object that contains information about the region ninepatch situation of a given region in an atlas.
+ ///
public class AtlasRegionData
{
+ ///
+ /// Name of the region for referencial purposes.
+ ///
public string name;
+ ///
+ /// The location of the patch is designated by this rectangle.
+ ///
public Rectangle location;
+ ///
+ /// The ninepatch information.
+ ///
public NinePatchData ninePatchData;
+ ///
+ /// Sets position in atlas for convenience.
+ ///
+ /// X coordinate of the position in the patch.
+ /// Y coordinate of the position in the patch.
public void SetPosition(int x, int y)
{
location.X = x;
location.Y = y;
}
+ ///
+ /// Sets the dimensions of the region on the atlas for convenience.
+ ///
+ /// Width of the region.
+ /// Height of the region.
public void SetSize(int width, int height)
{
location.Width = width;
location.Height = height;
}
+ ///
+ /// Sets both the coordinates and dimensions of the region on the atlas for convenience.
+ ///
+ /// X coordinate of the position in the patch.
+ /// Y coordinate of the position in the patch.
+ /// Width of the region.
+ /// Height of the region.
public void SetBounds(int x, int y, int width, int height)
{
SetPosition(x, y);
diff --git a/RecrownedAthenaeum/RecrownedAthenaeum.csproj b/RecrownedAthenaeum/RecrownedAthenaeum.csproj
index b02ee9e..66a6287 100644
--- a/RecrownedAthenaeum/RecrownedAthenaeum.csproj
+++ b/RecrownedAthenaeum/RecrownedAthenaeum.csproj
@@ -23,6 +23,7 @@
DEBUG;TRACE
prompt
4
+ bin\Debug\RecrownedAthenaeum.xml
pdbonly
diff --git a/RecrownedAthenaeum/UI/Skin/Definitions/ButtonSkinDefinition.cs b/RecrownedAthenaeum/UI/Skin/Definitions/ButtonSkinDefinition.cs
index 3e28474..821498a 100644
--- a/RecrownedAthenaeum/UI/Skin/Definitions/ButtonSkinDefinition.cs
+++ b/RecrownedAthenaeum/UI/Skin/Definitions/ButtonSkinDefinition.cs
@@ -6,7 +6,7 @@ namespace RecrownedAthenaeum.UI.Skin.Definitions
///
/// Definition for a button.
///
- public class ButtonSkinDefinition : ISkinDefinition
+ public class ButtonSkinDefinition : ISkinDefinitionData
{
///
/// Names for the regions in the texture atlas respectively.
diff --git a/RecrownedAthenaeum/UI/Skin/Definitions/ISkinDefinition.cs b/RecrownedAthenaeum/UI/Skin/Definitions/ISkinDefinition.cs
index 9b2aa26..7072be0 100644
--- a/RecrownedAthenaeum/UI/Skin/Definitions/ISkinDefinition.cs
+++ b/RecrownedAthenaeum/UI/Skin/Definitions/ISkinDefinition.cs
@@ -3,9 +3,9 @@
namespace RecrownedAthenaeum.UI.Skin.Definitions
{
///
- /// A definition for the skin system.
+ /// A definition containing the data for the skin system. Should be in data transfer object model.
///
- public interface ISkinDefinition
+ public interface ISkinDefinitionData
{
///
/// The module type this definition is definining.
diff --git a/RecrownedAthenaeum/UI/Skin/Definitions/TextSkinDefinition.cs b/RecrownedAthenaeum/UI/Skin/Definitions/TextSkinDefinition.cs
index f8b3b1b..435d58b 100644
--- a/RecrownedAthenaeum/UI/Skin/Definitions/TextSkinDefinition.cs
+++ b/RecrownedAthenaeum/UI/Skin/Definitions/TextSkinDefinition.cs
@@ -3,7 +3,7 @@ using static System.Net.Mime.MediaTypeNames;
namespace RecrownedAthenaeum.UI.Skin.Definitions
{
- class TextSkinDefinition : ISkinDefinition
+ class TextSkinDefinition : ISkinDefinitionData
{
public string font;
public string color;
diff --git a/RecrownedAthenaeum/UI/Skin/Skin.cs b/RecrownedAthenaeum/UI/Skin/Skin.cs
index 41381e7..6c598cf 100644
--- a/RecrownedAthenaeum/UI/Skin/Skin.cs
+++ b/RecrownedAthenaeum/UI/Skin/Skin.cs
@@ -24,7 +24,7 @@ namespace RecrownedAthenaeum.UI.Skin
/// Fonts stored in this skin.
///
public readonly Dictionary fonts;
- Dictionary> definitions;
+ Dictionary> definitions;
///
/// Creates a basic unfilled skin.
@@ -35,7 +35,7 @@ namespace RecrownedAthenaeum.UI.Skin
this.textureAtlas = textureAtlas;
colors = new Dictionary();
fonts = new Dictionary();
- definitions = new Dictionary>();
+ definitions = new Dictionary>();
}
///
@@ -53,12 +53,12 @@ namespace RecrownedAthenaeum.UI.Skin
}
///
- /// Returns an of the given name and type.
+ /// Returns an of the given name and type.
///
/// Name of definition of the
/// The UIModule the definition defines.
/// The interface for the definition.
- public ISkinDefinition ObtainDefinition(string definitionName, Type type)
+ public ISkinDefinitionData ObtainDefinition(string definitionName, Type type)
{
if (definitionName == null) definitionName = "default";
if (!definitions.ContainsKey(type) || !definitions[type].ContainsKey(definitionName)) throw new ArgumentException("Could not find skin of type " + type.Name + " with name " + definitionName);
@@ -66,11 +66,11 @@ namespace RecrownedAthenaeum.UI.Skin
}
///
- /// Returns the default of the given parameters.
+ /// Returns the default of the given parameters.
///
/// The type of definition the default should be coming from.
/// The default definition for the given type.
- public ISkinDefinition ObtainDefinition(Type type)
+ public ISkinDefinitionData ObtainDefinition(Type type)
{
return ObtainDefinition(null, type);
}
@@ -82,7 +82,7 @@ namespace RecrownedAthenaeum.UI.Skin
/// The name of the definition.
/// UIModule type the definition defines.
/// The definition cast to T.
- public T ObtainDefinition(string definitionName, Type type) where T : ISkinDefinition
+ public T ObtainDefinition(string definitionName, Type type) where T : ISkinDefinitionData
{
if (definitionName == null) definitionName = "default";
return (T)ObtainDefinition(definitionName, type);
@@ -94,7 +94,7 @@ namespace RecrownedAthenaeum.UI.Skin
/// Convenience to cast to T.
/// The type of the UIModule to retrieve the default from.
/// The default definition for the given type.
- public T ObtainDefinition(Type type) where T : ISkinDefinition
+ public T ObtainDefinition(Type type) where T : ISkinDefinitionData
{
return ObtainDefinition(null, type);
}
@@ -104,11 +104,11 @@ namespace RecrownedAthenaeum.UI.Skin
///
/// The name of the definition.
/// The definition itself.
- public void AddDefinition(string definitionName, ISkinDefinition skinDefinition)
+ public void AddDefinition(string definitionName, ISkinDefinitionData skinDefinition)
{
if (!definitions.ContainsKey(skinDefinition.UIModuleType))
{
- definitions.Add(skinDefinition.UIModuleType, new Dictionary());
+ definitions.Add(skinDefinition.UIModuleType, new Dictionary());
} else if (definitions[skinDefinition.UIModuleType].ContainsKey(definitionName)) throw new ArgumentException("Type of definition with that name already exists!");
definitions[skinDefinition.UIModuleType].Add(definitionName, skinDefinition);
diff --git a/RecrownedAthenaeum/UI/Skin/SkinData.cs b/RecrownedAthenaeum/UI/Skin/SkinData.cs
index 7e57e6e..9939a0c 100644
--- a/RecrownedAthenaeum/UI/Skin/SkinData.cs
+++ b/RecrownedAthenaeum/UI/Skin/SkinData.cs
@@ -7,29 +7,72 @@ using System.Threading.Tasks;
namespace RecrownedAthenaeum.UI.Skin
{
+ ///
+ /// Data transfer object for game skins.
+ ///
public class SkinData
{
+ ///
+ /// The name of the atlas with solution of ".tatlas".
+ ///
public string nameOfTextureAtlas;
+ ///
+ /// The color data containing the name of the color, and red, green, and blue values for the color.
+ ///
public ColorData[] colors;
+ ///
+ /// The font data containing the name of the font and name of the file for the font.
+ ///
public FontData[] fonts;
+ ///
+ /// The skin definitions containing a name for the definition, and the definition itself.
+ ///
public DefinitionData[] definitions;
+ ///
+ /// Color data for data transfer.
+ ///
public class ColorData
{
- string name;
- int r, g, b;
+ ///
+ /// Name of color to be referenced by.
+ ///
+ public string name;
+
+ ///
+ /// RGB data of this color.
+ ///
+ public int r, g, b;
}
+ ///
+ /// Font data for data transfer.
+ ///
public class FontData
{
- string name;
- string font;
+ ///
+ /// Name of font to be referenced by.
+ ///
+ public string name;
+ ///
+ /// Name of the file that contains the font. Shouldn't have extension.
+ ///
+ public string font;
}
+ ///
+ /// Definition data for data transfer.
+ ///
public class DefinitionData
{
- string name;
- ISkinDefinition skin;
+ ///
+ /// Name of definition to be referenced by.
+ ///
+ public string name;
+ ///
+ /// The skin definition data.
+ ///
+ public ISkinDefinitionData skin;
}
}
}