refactor and documentation

This commit is contained in:
Harrison Deng 2019-01-20 21:10:52 -06:00
parent 15defa37db
commit 5f4e870656

View File

@ -30,7 +30,10 @@ namespace RecrownedAthenaeum.UI.Skin
private string selectedSkinPath;
private SkinData skinDataToUse;
public bool ReadyForUse { get { return (SelectedSkin != null && BaseSkin != null); } }
/// <summary>
/// Whether or not the skin manager is set up with a <see cref="BaseSkin"/> and <see cref="loadedSkin"/>.
/// </summary>
public bool ReadyForUse { get { return (loadedSkin != null && BaseSkin != null); } }
/// <summary>
/// The list of paths for all found skins by <see cref="SearchSkinDirectory"/>. May be null.
@ -63,9 +66,9 @@ namespace RecrownedAthenaeum.UI.Skin
public ISkin Skin { get { return mergedSkin; } }
/// <summary>
/// The user selected 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(GraphicsDevice, SkinData, string)"/>.
/// </summary>
public ISkin SelectedSkin { get { return mergedSkin.mainSkin; } private set { mergedSkin.mainSkin = value; } }
public ISkin loadedSkin { get { return mergedSkin.mainSkin; } private set { mergedSkin.mainSkin = value; } }
/// <summary>
/// The fallback skin in case the selected skin doesn't cover a specific definition or color.
@ -131,7 +134,7 @@ namespace RecrownedAthenaeum.UI.Skin
OnAsyncComplete(action);
break;
case Action.LOAD:
SelectedSkin = LoadSkinFromData(skinDataToUse, selectedSkinPath, graphicsDevice);
loadedSkin = LoadSkinFromData(skinDataToUse, selectedSkinPath, graphicsDevice);
OnAsyncComplete(action);
break;
}