attempt at fixing skin system as well as improved convenience.
This commit is contained in:
@@ -41,36 +41,12 @@ namespace RecrownedAthenaeum.UI.SkinSystem
|
||||
/// <returns>The region corresponding to the name.</returns>
|
||||
TextureAtlas.Region GetTextureAtlasRegion(string name);
|
||||
|
||||
/// <summary>
|
||||
/// Returns an <see cref="ISkinDefinitionData"/> of the given name and type.
|
||||
/// </summary>
|
||||
/// <param name="definitionName">Name of definition of the <paramref name="type"/></param>
|
||||
/// <param name="type">The UIModule the definition defines.</param>
|
||||
/// <returns>The interface for the definition.</returns>
|
||||
ISkinDefinitionData ObtainDefinition(string definitionName, Type type);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the default <see cref="ISkinDefinitionData"/> of the given parameters.
|
||||
/// </summary>
|
||||
/// <param name="type">The type of definition the default should be coming from.</param>
|
||||
/// <returns>The default definition for the given type.</returns>
|
||||
ISkinDefinitionData ObtainDefinition(Type type);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the proper definition for the given parameters or throws exception in the case the requested definition does not exist.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Convenience to cast to the needed definition type.</typeparam>
|
||||
/// <param name="definitionName">The name of the definition.</param>
|
||||
/// <param name="type">UIModule type the definition defines.</param>
|
||||
/// <param name="definitionName">The name of the definition. Default is null and will be replaced with "default" for name.</param>
|
||||
/// <returns>The definition cast to T.</returns>
|
||||
T ObtainDefinition<T>(string definitionName, Type type) where T : ISkinDefinitionData;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the default definition.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Convenience to cast to T.</typeparam>
|
||||
/// <param name="type">The type of the UIModule to retrieve the default from.</param>
|
||||
/// <returns>The default definition for the given type.</returns>
|
||||
T ObtainDefinition<T>(Type type) where T : ISkinDefinitionData;
|
||||
T ObtainDefinition<T>(string definitionName = null) where T : ISkinDefinitionData;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user