refactors

This commit is contained in:
Harrison Deng 2019-01-14 23:38:50 -06:00
parent f4dcc9b5a7
commit f5cbd9dbab
4 changed files with 7 additions and 6 deletions

View File

@ -5,16 +5,16 @@ namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
public class TextureAtlasData
{
public TextureAtlasRegion[] regions;
public AtlasRegionData[] regions;
public string textureName;
public TextureAtlasData(string textureName, TextureAtlasRegion[] regions)
public TextureAtlasData(string textureName, AtlasRegionData[] regions)
{
this.regions = regions;
this.textureName = textureName;
}
public class TextureAtlasRegion
public class AtlasRegionData
{
public string name;
public Rectangle location;

View File

@ -122,7 +122,7 @@ namespace RecrownedAthenaeum.Tools.TextureAtlas
{
GraphicsOptions gOptions = new GraphicsOptions();
TextureAtlasData.TextureAtlasRegion[] regions = new TextureAtlasData.TextureAtlasRegion[imageHandlersDictionary.Count];
TextureAtlasData.AtlasRegionData[] regions = new TextureAtlasData.AtlasRegionData[imageHandlersDictionary.Count];
using (Image<Rgba32> atlasTexture = new Image<Rgba32>(TextureLength, TextureLength))
{
@ -130,7 +130,7 @@ namespace RecrownedAthenaeum.Tools.TextureAtlas
for (int i = 0; i < imageHandlers.Length; i++)
{
regions[i] = new TextureAtlasData.TextureAtlasRegion();
regions[i] = new TextureAtlasData.AtlasRegionData();
ImageHandler ih = imageHandlers[i];
regions[i].SetBounds(ih.x, ih.y, ih.Width, ih.Height);
regions[i].ninePatchData = ih.ninePatchData;

View File

@ -20,7 +20,7 @@ namespace RecrownedAthenaeum.Pipeline
for (int regionID = 0; regionID < regions.Length; regionID++)
{
TextureAtlasData.TextureAtlasRegion regionData = atlasData.regions[regionID];
TextureAtlasData.AtlasRegionData regionData = atlasData.regions[regionID];
DataTypes.NinePatch nPatch = null;
if (regionData.ninePatchData != null)
{

View File

@ -88,6 +88,7 @@
<Compile Include="UI\Skin\Definitions\TextButtonSkinDefinition.cs" />
<Compile Include="UI\Skin\Definitions\TextSkinDefinition.cs" />
<Compile Include="UI\Skin\Skin.cs" />
<Compile Include="UI\Skin\SkinData.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />