20 lines
785 B
C#
20 lines
785 B
C#
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
|||
|
using Newtonsoft.Json;
|
|||
|
using RecrownedGTK.Data;
|
|||
|
using System.IO;
|
|||
|
using System.Text;
|
|||
|
|
|||
|
namespace RecrownedGTK.Pipeline.NinePatch
|
|||
|
{
|
|||
|
[ContentImporter(DisplayName = "Nine Patch - RecrownedGTK")]
|
|||
|
class NinePatchProcessor : ContentProcessor<NinePatchData, NinePatchData>
|
|||
|
{
|
|||
|
public override NinePatchData Process(NinePatchData input, ContentProcessorContext context)
|
|||
|
{
|
|||
|
if (Path.GetFileNameWithoutExtension(context.SourceIdentity.SourceFilename) == Path.GetFileNameWithoutExtension(input.textureName)) throw new InvalidContentException("Ninepatch data and texture for the data can't have the same name.");
|
|||
|
context.AddDependency(input.textureName);
|
|||
|
return input;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|