2018-12-23 11:04:11 -06:00
|
|
|
|
using Microsoft.Xna.Framework.Content;
|
2019-01-21 19:56:51 -06:00
|
|
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
|
using RecrownedAthenaeum.SpecialTypes;
|
2018-12-23 11:04:11 -06:00
|
|
|
|
|
2019-01-20 21:45:15 -06:00
|
|
|
|
namespace RecrownedAthenaeum.ContentReaders
|
2018-12-23 11:04:11 -06:00
|
|
|
|
{
|
2019-01-21 19:56:51 -06:00
|
|
|
|
class NinePatchDataReader : ContentTypeReader<NinePatch>
|
2018-12-23 11:04:11 -06:00
|
|
|
|
{
|
2019-01-21 19:56:51 -06:00
|
|
|
|
protected override NinePatch Read(ContentReader input, NinePatch existingInstance)
|
2018-12-23 11:04:11 -06:00
|
|
|
|
{
|
2019-03-20 19:28:16 -05:00
|
|
|
|
Texture2D texture = input.ContentManager.Load<Texture2D>(input.ReadString());
|
|
|
|
|
NinePatch ninePatch = new NinePatch(texture, input.ReadInt32(), input.ReadInt32(), input.ReadInt32(), input.ReadInt32());
|
2019-01-21 19:56:51 -06:00
|
|
|
|
return ninePatch;
|
2018-12-23 11:04:11 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|