protected override void Save(IniKeyCollection iniData, NinepatchLayer data, LayerHandlerContext context) { iniData.Add("top", data.Top); iniData.Add("bottom", data.Bottom); iniData.Add("left", data.Left); iniData.Add("right", data.Right); }
protected override void Save(IniKeyCollection iniData, AudioLayer data, LayerHandlerContext context) { iniData.Add("id", data.Id); iniData.Add("volume", data.BaseVolume); context.SaveExternalFile(AudioFileKey, data.Data); }
protected override void Save(IniKeyCollection iniData, TileLayer data, LayerHandlerContext context) { iniData.Add("type", data.Type); iniData.Add("id", data.Id); iniData.Add("weight", data.Weight); context.SaveExternalFile(ImageFileKey, data.ImageData); }
protected override void Save(IniKeyCollection iniData, ImageLayer data, LayerHandlerContext context) { iniData.Add("id", data.Id); iniData.Add("z", data.Z); iniData.Add("subz", data.SubZ); iniData.Add("off", data.Offset); context.SaveExternalFile(ImageFileKey, data.Data); }
protected override void Save(IniKeyCollection iniData, CodeEntryLayer data, LayerHandlerContext context) { foreach (var entry in data.Entries) { iniData.Add("entry", $"{entry.Name}:{entry.ClassName}"); } foreach (var classpath in data.Classpath) { iniData.Add("ref", $"{classpath.Name}:{classpath.Version}"); } }
protected override void Save(IniKeyCollection iniData, ActionLayer data, LayerHandlerContext context) { iniData.Add("name", data.Name); iniData.Add("hotkey", data.Hotkey); if (!data.Parent.IsEmpty()) { iniData.Add("parent", $"{data.Parent.Name}:{data.Parent.Version}"); } if (!string.IsNullOrEmpty(data.Prerequisite)) { iniData.Add("prereq", data.Prerequisite); } if (data.Verbs != null && data.Verbs.Length > 0) { iniData.Add("verbs", string.Join(",", data.Verbs)); } }
protected override void Save(IniKeyCollection iniData, TexLayer data, LayerHandlerContext context) { context.SaveExternalFile(ImageFileKey, data.ImageData); if (data.MaskImageData != null) { context.SaveExternalFile(MaskFileKey, data.MaskImageData); } iniData.Add("id", data.Id); iniData.Add("off", data.Offset); iniData.Add("size", data.Size); iniData.Add("magfilter", data.MagFilter.ToString()); iniData.Add("minfilter", data.MinFilter.ToString()); iniData.Add("mipmap", data.Mipmap.ToString()); }
public static void Add(this IniKeyCollection keys, string key, char value) { keys.Add(key, value.ToString()); }
public static void Add(this IniKeyCollection keys, string key, double value) { keys.Add(key, value.ToString(CultureInfo.InvariantCulture)); }
public static void Add(this IniKeyCollection keys, string key, Point2D value) { keys.Add(key, $"{value.X:D},{value.Y:D}"); }
public static void Add(this IniKeyCollection keys, string key, int value) { keys.Add(key, $"{value:D}"); }
protected override void Save(IniKeyCollection iniData, CodeLayer data, LayerHandlerContext context) { iniData.Add("name", data.Name); context.SaveExternalFile(ClassFileKey, data.ByteCode); }
protected override void Save(IniKeyCollection iniData, TilesetLayer data, LayerHandlerContext context) { iniData.Add("has_transitions", data.HasTransitions.ToString()); }