diff --git a/SpriteLibrary/SpriteEntryForm.cs b/SpriteLibrary/SpriteEntryForm.cs index ce8c60d..8b8fb40 100644 --- a/SpriteLibrary/SpriteEntryForm.cs +++ b/SpriteLibrary/SpriteEntryForm.cs @@ -686,7 +686,21 @@ namespace SpriteLibrary private void btnDeleteAnim_Click(object sender, EventArgs e) { - + //delete the current entry. Deal with zero entries. + DialogResult Answer = MessageBox.Show("Delete The current Animation?", "Delete", MessageBoxButtons.YesNo); + if (Answer == DialogResult.Yes) + { + TempInformation.Animations.RemoveAt(CurrentSIAnimation); + CurrentSIAnimation--; + if (CurrentSIAnimation < 0 && TempInformation.Animations.Count > 0) CurrentSIAnimation = 0; + if(TempInformation.Animations.Count == 0) + { + AnimationInfo AI = new AnimationInfo(); + TempInformation.Animations.Add(AI); + CurrentSIAnimation = 0; + } + WeHaveNewItem(); + } } } }