changed skin merge system to completely using try and catch, as well as minor documentation change.
This commit is contained in:
parent
067defc8c6
commit
69d8e59e8b
@ -23,10 +23,15 @@ namespace RecrownedAthenaeum.UI.Skin
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (mainSkin.CursorTexture != null) return mainSkin.CursorTexture;
|
try
|
||||||
|
{
|
||||||
|
return mainSkin.CursorTexture;
|
||||||
|
} catch (NullReferenceException)
|
||||||
|
{
|
||||||
return alternateSkin.CursorTexture;
|
return alternateSkin.CursorTexture;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Draw(string regionName, string color, SpriteBatch batch, Rectangle destination, float rotation = 0, Vector2 origin = default(Vector2))
|
public void Draw(string regionName, string color, SpriteBatch batch, Rectangle destination, float rotation = 0, Vector2 origin = default(Vector2))
|
||||||
{
|
{
|
||||||
|
@ -76,7 +76,7 @@ namespace RecrownedAthenaeum.UI.Skin
|
|||||||
public ISkin loadedSkin { get { return mergedSkin.mainSkin; } private set { mergedSkin.mainSkin = value; } }
|
public ISkin loadedSkin { get { return mergedSkin.mainSkin; } private set { mergedSkin.mainSkin = value; } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The fallback skin in case the selected skin doesn't cover a specific definition or color.
|
/// The default skin in case the selected skin doesn't cover a specific definition or color.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ISkin BaseSkin { get { return mergedSkin.alternateSkin; } set { mergedSkin.alternateSkin = value; } }
|
public ISkin BaseSkin { get { return mergedSkin.alternateSkin; } set { mergedSkin.alternateSkin = value; } }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user