using Microsoft.Xna.Framework.Content; using Newtonsoft.Json; using RecrownedAthenaeum.DataTypes; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RecrownedAthenaeum.Pipeline { class NinePatchDataReader : ContentTypeReader { protected override DataTypes.NinePatch Read(ContentReader input, DataTypes.NinePatch existingInstance) { int length = input.ReadInt32(); byte[] bytes = input.ReadBytes(length); return JsonConvert.DeserializeObject(Encoding.UTF8.GetString(bytes)); } } }