2018-12-23 17:04:11 +00:00
|
|
|
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
2019-01-22 01:56:51 +00:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using RecrownedAthenaeum.Data;
|
2018-12-23 17:04:11 +00:00
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace RecrownedAthenaeum.Pipeline.NinePatch
|
|
|
|
|
{
|
2019-03-21 00:28:16 +00:00
|
|
|
|
[ContentImporter(".9p", DisplayName = "Nine Patch Importer - RecrownedAthenaeum", DefaultProcessor = "NinePatchProcessor")]
|
|
|
|
|
internal class NinePatchImporter : ContentImporter<NinePatchData>
|
2018-12-23 17:04:11 +00:00
|
|
|
|
{
|
2019-03-21 00:28:16 +00:00
|
|
|
|
public override NinePatchData Import(string filename, ContentImporterContext context)
|
2018-12-23 17:04:11 +00:00
|
|
|
|
{
|
2019-03-21 00:28:16 +00:00
|
|
|
|
return JsonConvert.DeserializeObject<NinePatchData>(File.ReadAllText(filename));
|
2018-12-23 17:04:11 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|