attempt at fixing skin system as well as improved convenience.
This commit is contained in:
@@ -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);
|
||||
|
@@ -45,7 +45,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
|
||||
/// <param name="definitionName">Name of the definition for this type in the skin given.</param>
|
||||
public TextButton(string text, SpriteFont font, ISkin skin, string definitionName = null) : base(skin, definitionName)
|
||||
{
|
||||
TextButtonSkinDefinition skinDefinition = skin.ObtainDefinition<TextButtonSkinDefinition>(definitionName, GetType());
|
||||
TextButtonSkinDefinition skinDefinition = skin.ObtainDefinition<TextButtonSkinDefinition>(definitionName);
|
||||
this.text = new Text(font, text);
|
||||
FontColor = skin.GetColor(skinDefinition.fontColor);
|
||||
}
|
||||
|
@@ -64,7 +64,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules
|
||||
/// <param name="content">The string of text to be displayed.</param>
|
||||
public Text(ISkin skin, SpriteFont font, string skinDefinitionName = null, string content = null) : this(font, content)
|
||||
{
|
||||
skinDefinition = skin.ObtainDefinition<TextSkinDefinition>(skinDefinitionName, GetType());
|
||||
skinDefinition = skin.ObtainDefinition<TextSkinDefinition>(skinDefinitionName);
|
||||
color = skin.GetColor(skinDefinition.color);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user