Delete animations

This commit is contained in:
Tim Young 2017-09-20 11:39:09 -05:00
parent 8bf6378246
commit dddab20eef
1 changed files with 15 additions and 1 deletions

View File

@ -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();
}
}
}
}