Skin will now return null if the skin doesn't contain a texture region a definition potentially requests. If request name is null, will now also return null.

This commit is contained in:
Harrison Deng 2019-01-29 15:58:20 -06:00
parent ff2e0b479f
commit 60d02f1f81

View File

@ -47,9 +47,10 @@ namespace RecrownedAthenaeum.UI.SkinSystem
/// Returns a <see cref="TextureAtlas.Region"/> with given name of region.
/// </summary>
/// <param name="name">Name of region.</param>
/// <returns>The region corresponding to the name.</returns>
/// <returns>The region corresponding to the name or null if the requested region doesn't exist.</returns>
public virtual TextureAtlas.Region GetTextureAtlasRegion(string name)
{
if (!textureAtlas.ContainsRegion(name)) return null;
return textureAtlas[name];
}