Added better exception throwing for missing regions for skins by adding a required option for regions.
This commit is contained in:
@@ -39,8 +39,9 @@ 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>
|
||||
TextureAtlas.Region GetTextureAtlasRegion(string name);
|
||||
/// <param name="required">Whether or not the region is required. If true, it will throw an error if the region does not exist while if false, will return null if the region does not exist.</param>
|
||||
/// <returns>The region corresponding to the name and may return null depending on if the region exists, and is required.</returns>
|
||||
TextureAtlas.Region GetTextureAtlasRegion(string name, bool required = false);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the proper definition for the given parameters or throws exception in the case the requested definition does not exist.
|
||||
|
||||
Reference in New Issue
Block a user