diff --git a/SpriteLibrary/SpriteEntryForm.cs b/SpriteLibrary/SpriteEntryForm.cs
index 8810bc7..f2e6cde 100644
--- a/SpriteLibrary/SpriteEntryForm.cs
+++ b/SpriteLibrary/SpriteEntryForm.cs
@@ -222,6 +222,44 @@ namespace SpriteLibrary
}
}
+ ///
+ /// Take the values stored in TempInformation and push it out to our form
+ ///
+ private void FormToSpriteInformation()
+ {
+ if (TempInformation == null) return;
+ //For the main sprite information
+
+ TempInformation.SpriteName = tbSpriteName.Text;
+ int.TryParse(tbDefaultSize.Text, out TempInformation.ViewPercent);
+
+ //From the current animation
+ AnimationInfo AI = null;
+ if (CurrentSIAnimation < 0) CurrentSIAnimation = 0;
+ if (CurrentSIAnimation >= TempInformation.Animations.Count) CurrentSIAnimation = TempInformation.Animations.Count - 1;
+ if (CurrentSIAnimation < TempInformation.Animations.Count)
+ {
+ AI = TempInformation.Animations[CurrentSIAnimation];
+
+ int.TryParse(tbAmimationSpeed.Text, out AI.AnimSpeed);
+ AI.ImageName = cbStartingImage.Text;
+
+ AI.MirrorHorizontally = cbMirrorH.Checked;
+ AI.MirrorVertically = cbMirrorV.Checked;
+
+ int.TryParse(cbAnimation.Text, out AI.AnimationToUse);
+ int.TryParse(tbNumFrames.Text, out AI.NumFrames);
+
+ AI.StartPoint = ChosenArea.Location;
+ AI.Width = ChosenArea.Width;
+ AI.Height = ChosenArea.Height;
+
+ if (rbFromImage.Checked) AI.FieldsToUse = AnimationType.SpriteDefinition;
+ if (rbMirror.Checked) AI.FieldsToUse = AnimationType.Mirror;
+ if (rbRotation.Checked) AI.FieldsToUse = AnimationType.Rotation;
+ }
+ }
+
///
/// Given two locations that we have clicked on, find the area we have selected
///
@@ -283,6 +321,7 @@ namespace SpriteLibrary
private void btnApply_Click(object sender, EventArgs e)
{
+ FormToSpriteInformation();
if(CurrentSIIndex >0 && CurrentSIIndex < SpriteInformation.Count)
{
SpriteInformation[CurrentSIIndex].CopyFrom(TempInformation);