using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using RecrownedAthenaeum.SpecialTypes; namespace RecrownedAthenaeum.ContentReaders { class NinePatchDataReader : ContentTypeReader { protected override NinePatch Read(ContentReader input, NinePatch existingInstance) { Texture2D texture = input.ContentManager.Load(input.ReadString()); NinePatch ninePatch = new NinePatch(texture, input.ReadInt32(), input.ReadInt32(), input.ReadInt32(), input.ReadInt32()); return ninePatch; } } }