Progress on skin system, added skin stack.
This commit is contained in:
@@ -38,13 +38,14 @@ namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
|
||||
/// Constructs a text button using a skin and definition.
|
||||
/// </summary>
|
||||
/// <param name="text">The text to display.</param>
|
||||
/// <param name="font">The font to be used.</param>
|
||||
/// <param name="skin">The skin to use.</param>
|
||||
/// <param name="definitionName">Name of the definition for this type in the skin given.</param>
|
||||
public TextButton(string text, Skin.Skin skin, string definitionName = null) : base(skin, definitionName)
|
||||
public TextButton(string text, SpriteFont font, Skin.Skin skin, string definitionName = null) : base(skin, definitionName)
|
||||
{
|
||||
TextButtonSkinDefinition skinDefinition = skin.ObtainDefinition<TextButtonSkinDefinition>(definitionName, GetType());
|
||||
this.text = new Text(skin.fonts[skinDefinition.fontName], text);
|
||||
FontColor = skin.colors[skinDefinition.fontColor];
|
||||
this.text = new Text(font, text);
|
||||
FontColor = skin.GetColor(skinDefinition.fontColor);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user