2018-12-23 17:04:11 +00:00
|
|
|
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace RecrownedAthenaeum.Pipeline.NinePatch
|
|
|
|
|
{
|
2019-01-14 04:05:34 +00:00
|
|
|
|
[ContentImporter(DisplayName = "Nine Patch - RecrownedAthenaeum")]
|
|
|
|
|
class NinePatchProcessor : ContentProcessor<string, NinePatchData>
|
2018-12-23 17:04:11 +00:00
|
|
|
|
{
|
2019-01-14 04:05:34 +00:00
|
|
|
|
public override NinePatchData Process(string input, ContentProcessorContext context)
|
2018-12-23 17:04:11 +00:00
|
|
|
|
{
|
2019-01-14 04:05:34 +00:00
|
|
|
|
NinePatchData ninePatchData = JsonConvert.DeserializeObject<NinePatchData>(input);
|
|
|
|
|
context.AddDependency(ninePatchData.textureName);
|
|
|
|
|
return ninePatchData;
|
2018-12-23 17:04:11 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|