1
0
mirror of synced 2025-02-25 22:38:07 +01:00

Some fixes for animation timeline and animation switching

This commit is contained in:
KillzXGaming 2020-01-01 17:59:27 -05:00
parent d26f2373ac
commit 60e4860cfc

View File

@ -92,10 +92,13 @@ namespace Toolbox.Library
{
get
{
float frameCount = 1;
float frameCount = uint.MinValue;
for (int i = 0; i < currentAnimations.Count; i++)
frameCount = Math.Max(frameCount, currentAnimations[i].FrameCount);
if (frameCount == uint.MinValue)
frameCount = 1;
return frameCount;
}
}
@ -269,7 +272,11 @@ namespace Toolbox.Library
if (animationTrackBar.CurrentFrame == animationTrackBar.FrameCount - 1)
{
if (IsLooping)
{
//Reset the min setting as animations can potentically be switched
currentFrameUpDown.Minimum = (decimal)StartFrame;
currentFrameUpDown.Value = (decimal)StartFrame;
}
else
Stop();
}