Get anim fwd/backw working
This commit is contained in:
parent
e74de637eb
commit
c0d1d1599d
2
SpriteLibrary/SpriteEntryForm.Designer.cs
generated
2
SpriteLibrary/SpriteEntryForm.Designer.cs
generated
@ -436,6 +436,7 @@
|
||||
this.btnAnimFwd.TabIndex = 18;
|
||||
this.btnAnimFwd.Text = ">";
|
||||
this.btnAnimFwd.UseVisualStyleBackColor = true;
|
||||
this.btnAnimFwd.Click += new System.EventHandler(this.btnAnimFwd_Click);
|
||||
//
|
||||
// btnAnimBack
|
||||
//
|
||||
@ -446,6 +447,7 @@
|
||||
this.btnAnimBack.TabIndex = 19;
|
||||
this.btnAnimBack.Text = "<";
|
||||
this.btnAnimBack.UseVisualStyleBackColor = true;
|
||||
this.btnAnimBack.Click += new System.EventHandler(this.btnAnimBack_Click);
|
||||
//
|
||||
// lblAnimationFwdBack
|
||||
//
|
||||
|
@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user