diff --git a/SpriteLibrary/SpriteEntryForm.cs b/SpriteLibrary/SpriteEntryForm.cs index f2e6cde..52948a9 100644 --- a/SpriteLibrary/SpriteEntryForm.cs +++ b/SpriteLibrary/SpriteEntryForm.cs @@ -328,6 +328,7 @@ namespace SpriteLibrary } else { + string Try = SpriteDatabase.WriteToXMLString(TempInformation); SpriteInformation.Add(TempInformation); CurrentSIIndex = SpriteInformation.IndexOf(TempInformation); } @@ -339,6 +340,8 @@ namespace SpriteLibrary if (SpriteInformation.Count == 0) return; //nothing to do CurrentSIIndex++; if (CurrentSIIndex >= SpriteInformation.Count) CurrentSIIndex = 0; + if (TempInformation == null) TempInformation = new SpriteInfo(); + TempInformation.CopyFrom(SpriteInformation[CurrentSIIndex]); SpriteInformationToForm(); UpdateMenu(); } @@ -348,6 +351,8 @@ namespace SpriteLibrary if (SpriteInformation.Count == 0) return; //nothing to do CurrentSIIndex--; if (CurrentSIIndex < 0) CurrentSIIndex = SpriteInformation.Count - 1; + if (TempInformation == null) TempInformation = new SpriteInfo(); + TempInformation.CopyFrom(SpriteInformation[CurrentSIIndex]); SpriteInformationToForm(); UpdateMenu(); } diff --git a/SpriteLibrary/SpriteInfo.cs b/SpriteLibrary/SpriteInfo.cs index 75fe6bd..feceb6d 100644 --- a/SpriteLibrary/SpriteInfo.cs +++ b/SpriteLibrary/SpriteInfo.cs @@ -9,8 +9,8 @@ using System.Resources; namespace SpriteLibrary { - internal enum AnimationType { SpriteDefinition=0, Rotation=1, Mirror=2 } - internal class AnimationInfo + public enum AnimationType { SpriteDefinition=0, Rotation=1, Mirror=2 } + public class AnimationInfo { public AnimationType FieldsToUse = AnimationType.SpriteDefinition; public int AnimationToUse = 0; @@ -36,9 +36,9 @@ namespace SpriteLibrary public class SpriteInfo { - internal string SpriteName = ""; - internal int ViewPercent = 100; //The percent size of the sprite. 100 is full. 50 is half-size - internal List Animations = new List(); + public string SpriteName = ""; + public int ViewPercent = 100; //The percent size of the sprite. 100 is full. 50 is half-size + public List Animations = new List(); /// /// A generic cloning method that works when everything is public