Added setup system. Changed reader and writer for texture atlas and nine patch to have image and serialized data be in same file. Some refactors occurred as well.

This commit is contained in:
2019-01-21 19:56:51 -06:00
parent fbf6c5d1aa
commit ea6b3cf9e3
18 changed files with 145 additions and 111 deletions

View File

@@ -66,7 +66,7 @@ namespace RecrownedAthenaeum.UI.Skin
public ISkin Skin { get { return mergedSkin; } }
/// <summary>
/// The user loaded skin. Set by the skin loaded by calling <see cref="LoadSkin(GraphicsDevice, SkinData, string)"/>.
/// The user loaded skin. Set by the skin loaded by calling <see cref="LoadSkin(SkinData, string, GraphicsDevice)"/>.
/// </summary>
public ISkin loadedSkin { get { return mergedSkin.mainSkin; } private set { mergedSkin.mainSkin = value; } }
@@ -106,11 +106,12 @@ namespace RecrownedAthenaeum.UI.Skin
/// <summary>
/// loads a skin asynchronously.
/// </summary>
/// <param name="graphicsDevice">Graphics device to use for texture creation.</param>
/// <param name="graphicsDevice">Graphics device to use for texture creation. Uses graphics device from <see cref="Setup"/>by default.</param>
/// <param name="skinData">The data to generate from.</param>
/// <param name="path">The path pointing to the file with the extension "<see cref="EXTENSION"/>".</param>
public void LoadSkin(GraphicsDevice graphicsDevice, SkinData skinData, string path)
public void LoadSkin(SkinData skinData, string path, GraphicsDevice graphicsDevice = null)
{
if (graphicsDevice == null) graphicsDevice = Setup.graphicsDeviceManager.GraphicsDevice;
action = Action.LOAD;
this.graphicsDevice = graphicsDevice;
this.selectedSkinPath = path;