attempt at fixing skin system as well as improved convenience.

This commit is contained in:
2019-01-28 19:43:41 -06:00
parent 7892bff6be
commit 8ea9ae3921
7 changed files with 26 additions and 129 deletions

View File

@@ -57,7 +57,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
/// <param name="definitionName">The name of the definition in the skin. Can be null to select the default.</param>
public Button(ISkin skin, string definitionName = null)
{
skinDefinition = skin.ObtainDefinition<ButtonSkinDefinition>(definitionName, GetType());
skinDefinition = skin.ObtainDefinition<ButtonSkinDefinition>(definitionName);
downTexture = skin.GetTextureAtlasRegion(skinDefinition.downRegion);
upTexture = skin.GetTextureAtlasRegion(skinDefinition.upRegion);
disabledTexture = skin.GetTextureAtlasRegion(skinDefinition.disabledRegion);