Changed: Separated Panning and Dragging functions. Added: Frame duplication, FrameSprite replacement

This commit is contained in:
quinnvoker
2018-12-22 15:45:38 -08:00
parent 9e4c8732c3
commit 1a21b230ad
3 changed files with 184 additions and 119 deletions
+17
View File
@@ -143,6 +143,7 @@ namespace AnimationEditor
else
animationPreview.PreviewSprite.CurrentAnimation = currentAnimation;
frameTrackBar.Maximum = currentAnimation.Frames.Count() - 1;
frameListBox_SetSingleSelection(frameTrackBar.Value);
if(animations.Count < 1)
{
animations.Add(currentAnimation);
@@ -643,5 +644,21 @@ namespace AnimationEditor
{
ReadSpriteOffset();
}
private void duplicateFrameButton_Click(object sender, EventArgs e)
{
AddFrame(currentFrame.Clone());
}
private void replaceSpriteButton_Click(object sender, EventArgs e)
{
var spr = frameSprites[frameSpriteListBox.SelectedIndex];
var replacement = spriteSet[spriteListBox.SelectedIndex];
spr.Bounds = replacement.Bounds;
spr.Origin = replacement.Origin;
spr.Name = replacement.Name;
UpdateAnimation();
}
}
}