17 lines
608 B
C#
17 lines
608 B
C#
using Microsoft.Xna.Framework.Content;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using RecrownedAthenaeum.SpecialTypes;
|
|
|
|
namespace RecrownedAthenaeum.ContentReaders
|
|
{
|
|
class NinePatchDataReader : ContentTypeReader<NinePatch>
|
|
{
|
|
protected override NinePatch Read(ContentReader input, NinePatch existingInstance)
|
|
{
|
|
Texture2D texture = input.ContentManager.Load<Texture2D>(input.ReadString());
|
|
NinePatch ninePatch = new NinePatch(texture, input.ReadInt32(), input.ReadInt32(), input.ReadInt32(), input.ReadInt32());
|
|
return ninePatch;
|
|
}
|
|
}
|
|
}
|