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:
parent
ff2e0b479f
commit
60d02f1f81
@ -47,9 +47,10 @@ namespace RecrownedAthenaeum.UI.SkinSystem
|
|||||||
/// Returns a <see cref="TextureAtlas.Region"/> with given name of region.
|
/// Returns a <see cref="TextureAtlas.Region"/> with given name of region.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">Name of region.</param>
|
/// <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)
|
public virtual TextureAtlas.Region GetTextureAtlasRegion(string name)
|
||||||
{
|
{
|
||||||
|
if (!textureAtlas.ContainsRegion(name)) return null;
|
||||||
return textureAtlas[name];
|
return textureAtlas[name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user