Delete animations
This commit is contained in:
parent
8bf6378246
commit
dddab20eef
@ -686,7 +686,21 @@ namespace SpriteLibrary
|
|||||||
|
|
||||||
private void btnDeleteAnim_Click(object sender, EventArgs e)
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user