documentation.
This commit is contained in:
@@ -3,11 +3,24 @@ using System;
|
||||
|
||||
namespace RecrownedAthenaeum.UI.Skin.Definitions
|
||||
{
|
||||
/// <summary>
|
||||
/// Definition for a button.
|
||||
/// </summary>
|
||||
public class ButtonSkinDefinition : ISkinDefinition
|
||||
{
|
||||
/// <summary>
|
||||
/// Names for the regions in the texture atlas respectively.
|
||||
/// </summary>
|
||||
public string upRegion, downRegion, disabledRegion, selectedRegion;
|
||||
|
||||
///<inheritDoc/>
|
||||
public Type UIModuleType { get { return typeof(Button); } }
|
||||
|
||||
/// <summary>
|
||||
/// Constructs the definition with minimum requirements.
|
||||
/// </summary>
|
||||
/// <param name="downRegion">Name of region specifying the texture shown for when the button is pressed down.</param>
|
||||
/// <param name="upRegion">Name of region specifying the texture shown for when the button is not pressed.</param>
|
||||
public ButtonSkinDefinition(string downRegion, string upRegion)
|
||||
{
|
||||
this.downRegion = downRegion;
|
||||
|
@@ -2,8 +2,14 @@
|
||||
|
||||
namespace RecrownedAthenaeum.UI.Skin.Definitions
|
||||
{
|
||||
/// <summary>
|
||||
/// A definition for the skin system.
|
||||
/// </summary>
|
||||
public interface ISkinDefinition
|
||||
{
|
||||
/// <summary>
|
||||
/// The module type this definition is definining.
|
||||
/// </summary>
|
||||
Type UIModuleType { get; }
|
||||
}
|
||||
}
|
||||
|
@@ -7,13 +7,29 @@ using System.Collections.Generic;
|
||||
|
||||
namespace RecrownedAthenaeum.UI.Skin
|
||||
{
|
||||
/// <summary>
|
||||
/// A skin is used to group a theme which can then be applied to the UI via the use of modules.
|
||||
/// </summary>
|
||||
public class Skin
|
||||
{
|
||||
/// <summary>
|
||||
/// Texture atlas containing the skins textures.
|
||||
/// </summary>
|
||||
public readonly TextureAtlas textureAtlas;
|
||||
/// <summary>
|
||||
/// Colors stored in this skin.
|
||||
/// </summary>
|
||||
public readonly Dictionary<string, Color> colors;
|
||||
/// <summary>
|
||||
/// Fonts stored in this skin.
|
||||
/// </summary>
|
||||
public readonly Dictionary<string, SpriteFont> fonts;
|
||||
Dictionary<Type, Dictionary<string, ISkinDefinition>> definitions;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="textureAtlas"></param>
|
||||
public Skin(TextureAtlas textureAtlas)
|
||||
{
|
||||
this.textureAtlas = textureAtlas;
|
||||
|
Reference in New Issue
Block a user