refactors and added forgotten semicolon :/

This commit is contained in:
Harrison Deng 2019-01-20 01:07:52 -06:00
parent 9392124317
commit 6fdcdcf923
11 changed files with 42 additions and 18 deletions

View File

@ -1,6 +1,6 @@
using Microsoft.Xna.Framework.Content.Pipeline;
using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable;
using RecrownedAthenaeum.Data;
namespace RecrownedAthenaeum.Pipeline.NinePatch
{

View File

@ -1,7 +1,7 @@
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable;
using RecrownedAthenaeum.Data;
namespace RecrownedAthenaeum.Pipeline.NinePatch
{

View File

@ -1,6 +1,6 @@
using Microsoft.Xna.Framework.Content.Pipeline;
using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable;
using RecrownedAthenaeum.Data;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{

View File

@ -1,7 +1,7 @@
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable;
using RecrownedAthenaeum.Data;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{

View File

@ -1,5 +1,5 @@
using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable;
using RecrownedAthenaeum.Data;
using RecrownedAthenaeum.Tools.CommandProcessor;
using System;
using System.IO;

View File

@ -1,5 +1,5 @@
using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable;
using RecrownedAthenaeum.Data;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;

View File

@ -1,4 +1,4 @@
namespace RecrownedAthenaeum.Serializable
namespace RecrownedAthenaeum.Data
{
/// <summary>
/// Represents a data structure for 9patches.

View File

@ -1,6 +1,6 @@
using RecrownedAthenaeum.UI.Skin.Definitions;
namespace RecrownedAthenaeum.Serializable
namespace RecrownedAthenaeum.Data
{
/// <summary>
/// Data transfer object for game skins.
@ -8,19 +8,41 @@ namespace RecrownedAthenaeum.Serializable
public class SkinData
{
/// <summary>
/// Author name.
/// Holds metadata.
/// </summary>
public string author;
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;
}
/// <summary>
/// Description of skin.
/// The metadata for the skin file.
/// </summary>
public string description;
public Metadata metadata;
/// <summary>
/// The name of the atlas with extension.
/// </summary>
public string nameOfTextureAtlas;
/// <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;
/// <summary>
/// The color data containing the name of the color, and red, green, and blue values for the color.
/// </summary>

View File

@ -1,6 +1,6 @@
using Microsoft.Xna.Framework;
namespace RecrownedAthenaeum.Serializable
namespace RecrownedAthenaeum.Data
{
/// <summary>
/// Data transfer object for a texture atlas.

View File

@ -1,7 +1,7 @@
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable;
using RecrownedAthenaeum.Data;
using RecrownedAthenaeum.SpecialTypes;
namespace RecrownedAthenaeum.Pipeline
@ -12,7 +12,7 @@ namespace RecrownedAthenaeum.Pipeline
{
string serialized = input.ReadString();
TextureAtlasData atlasData = JsonConvert.DeserializeObject<TextureAtlasData>(serialized);
Texture2D atlasTexture = input.ContentManager.Load<Texture2D>(atlasData.textureName)
Texture2D atlasTexture = input.ContentManager.Load<Texture2D>(atlasData.textureName);
TextureAtlas atlas = new TextureAtlas(atlasTexture, GenerateAtlasRegionsFromData(atlasData, atlasTexture));
return atlas;

View File

@ -67,9 +67,9 @@
<Compile Include="Input\InputUtilities.cs" />
<Compile Include="ParticleSystem\Particle.cs" />
<Compile Include="Persistence\PreferencesManager.cs" />
<Compile Include="Serializable\NinePatchData.cs" />
<Compile Include="Data\NinePatchData.cs" />
<Compile Include="Pipeline\NinePatchDataReader.cs" />
<Compile Include="Serializable\TextureAtlasData.cs" />
<Compile Include="Data\TextureAtlasData.cs" />
<Compile Include="Pipeline\TextureAtlasDataReader.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Render\RectangleRenderer.cs" />
@ -90,9 +90,11 @@
<Compile Include="UI\Skin\Definitions\ISkinDefinition.cs" />
<Compile Include="UI\Skin\Definitions\TextButtonSkinDefinition.cs" />
<Compile Include="UI\Skin\Definitions\TextSkinDefinition.cs" />
<Compile Include="UI\Skin\ISkin.cs" />
<Compile Include="UI\Skin\Skin.cs" />
<Compile Include="Serializable\SkinData.cs" />
<Compile Include="Data\SkinData.cs" />
<Compile Include="UI\Skin\SkinManager.cs" />
<Compile Include="UI\Skin\SkinStack.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />