Get anim fwd/backw working

This commit is contained in:
2017-09-18 15:34:30 -05:00
parent e74de637eb
commit c0d1d1599d
2 changed files with 36 additions and 1 deletions

View File

@ -113,7 +113,17 @@ namespace SpriteLibrary
}
else
panelRadioButtons.Visible = true;
if(rbFromImage.Checked)
if(TempInformation.Animations.Count >1)
{
btnAnimBack.Enabled = true;
btnAnimFwd.Enabled = true;
}
else
{
btnAnimBack.Enabled = false;
btnAnimFwd.Enabled = false;
}
if (rbFromImage.Checked)
{
if(!TCTabPages.TabPages.Contains(tpFromImage))
TCTabPages.TabPages.Add(tpFromImage);
@ -398,5 +408,28 @@ namespace SpriteLibrary
SpriteInformationToForm();
UpdateMenu();
}
private void btnAnimBack_Click(object sender, EventArgs e)
{
ApplyChanges();
CurrentSIAnimation--;
if (CurrentSIAnimation < 0)
CurrentSIAnimation = TempInformation.Animations.Count - 1;
SpriteInformationToForm();
UpdateMenu();
}
private void btnAnimFwd_Click(object sender, EventArgs e)
{
ApplyChanges();
CurrentSIAnimation++;
if (CurrentSIAnimation >=TempInformation.Animations.Count)
CurrentSIAnimation = 0;
SpriteInformationToForm();
UpdateMenu();
}
}
}