Changed use of Skin to ISkin.

This commit is contained in:
Harrison Deng 2019-01-27 18:14:10 -06:00
parent 44e574ddce
commit 501da58cb7
3 changed files with 6 additions and 3 deletions

View File

@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Input;
using RecrownedAthenaeum.SpecialTypes;
using RecrownedAthenaeum.Input;
using RecrownedAthenaeum.UI.SkinSystem.Definitions;
using RecrownedAthenaeum.UI.SkinSystem;
namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
{
@ -54,7 +55,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
/// </summary>
/// <param name="skin">The skin containing the information of the textures and design to follow.</param>
/// <param name="definitionName">The name of the definition in the skin. Can be null to select the default.</param>
public Button(SkinSystem.Skin skin, string definitionName = null)
public Button(ISkin skin, string definitionName = null)
{
skinDefinition = skin.ObtainDefinition<ButtonSkinDefinition>(definitionName, GetType());
downTexture = skin.GetTextureAtlasRegion(skinDefinition.downRegion);

View File

@ -1,6 +1,7 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using RecrownedAthenaeum.SpecialTypes;
using RecrownedAthenaeum.UI.SkinSystem;
using RecrownedAthenaeum.UI.SkinSystem.Definitions;
namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
@ -42,7 +43,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
/// <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, SpriteFont font, SkinSystem.Skin skin, string definitionName = null) : base(skin, definitionName)
public TextButton(string text, SpriteFont font, ISkin skin, string definitionName = null) : base(skin, definitionName)
{
TextButtonSkinDefinition skinDefinition = skin.ObtainDefinition<TextButtonSkinDefinition>(definitionName, GetType());
this.text = new Text(font, text);

View File

@ -1,5 +1,6 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using RecrownedAthenaeum.UI.SkinSystem;
using RecrownedAthenaeum.UI.SkinSystem.Definitions;
using System.Text;
@ -61,7 +62,7 @@ namespace RecrownedAthenaeum.UI.Modular.Modules
/// <param name="skinDefinitionName">The name of the skin's definition to use of a <see cref="TextSkinDefinition"/>.</param>
/// <param name="font">The font to be used.</param>
/// <param name="content">The string of text to be displayed.</param>
public Text(SkinSystem.Skin skin, SpriteFont font, string skinDefinitionName = null, string content = null) : this(font, content)
public Text(ISkin skin, SpriteFont font, string skinDefinitionName = null, string content = null) : this(font, content)
{
skinDefinition = skin.ObtainDefinition<TextSkinDefinition>(skinDefinitionName, GetType());
color = skin.GetColor(skinDefinition.color);