forward/back buttons working & initial "save"

This commit is contained in:
2017-09-18 07:47:58 -05:00
parent ee9f046562
commit 795a4c6ce7
2 changed files with 35 additions and 0 deletions

View File

@ -280,5 +280,37 @@ namespace SpriteLibrary
WeAreDragging = false;
}
private void btnApply_Click(object sender, EventArgs e)
{
if(CurrentSIIndex >0 && CurrentSIIndex < SpriteInformation.Count)
{
SpriteInformation[CurrentSIIndex].CopyFrom(TempInformation);
}
else
{
SpriteInformation.Add(TempInformation);
CurrentSIIndex = SpriteInformation.IndexOf(TempInformation);
}
UpdateMenu();
}
private void btnFwd_Click(object sender, EventArgs e)
{
if (SpriteInformation.Count == 0) return; //nothing to do
CurrentSIIndex++;
if (CurrentSIIndex >= SpriteInformation.Count) CurrentSIIndex = 0;
SpriteInformationToForm();
UpdateMenu();
}
private void btnBack_Click(object sender, EventArgs e)
{
if (SpriteInformation.Count == 0) return; //nothing to do
CurrentSIIndex--;
if (CurrentSIIndex < 0) CurrentSIIndex = SpriteInformation.Count - 1;
SpriteInformationToForm();
UpdateMenu();
}
}
}