added documentation and cleaned up some parameters. Added obtain and draw functions to the skin class.
This commit is contained in:
@@ -25,9 +25,19 @@ namespace RecrownedAthenaeum.UI.Skin
|
||||
definitions = new Dictionary<Type, Dictionary<string, ISkinDefinition>>();
|
||||
}
|
||||
|
||||
public void Draw(string texture, string color, Rectangle region)
|
||||
public void Draw(string regionName, string color, SpriteBatch batch, Rectangle destination, Type type, float rotation = 0, Vector2 origin = default(Vector2))
|
||||
{
|
||||
|
||||
textureAtlas.Draw(regionName, batch, destination, colors[color], rotation, origin);
|
||||
}
|
||||
|
||||
public ISkinDefinition ObtainDefinition(string definitionName, Type type)
|
||||
{
|
||||
return definitions[type][definitionName];
|
||||
}
|
||||
|
||||
public T ObtainDefinition<T>(string definitionName) where T : ISkinDefinition
|
||||
{
|
||||
return (T)definitions[typeof(T)][definitionName];
|
||||
}
|
||||
|
||||
public void AddDefinition(string definitionName, ISkinDefinition skinDefinition)
|
||||
|
Reference in New Issue
Block a user