mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-03 18:44:54 +00:00
Fix for .gif import not setting correct category
This commit is contained in:
@@ -74,15 +74,20 @@ namespace PckStudio.Forms.Editor
|
||||
animationPictureBox.BlendColor = blendColor;
|
||||
}
|
||||
|
||||
private void ValidateToolStrip()
|
||||
{
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled =
|
||||
importToolStripMenuItem.Enabled =
|
||||
exportAsToolStripMenuItem.Enabled =
|
||||
changeTileToolStripMenuItem.Enabled =
|
||||
InterpolationCheckbox.Visible = !IsSpecialTile(_tileName);
|
||||
}
|
||||
|
||||
private void AnimationEditor_Load(object sender, EventArgs e)
|
||||
{
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled =
|
||||
importToolStripMenuItem.Enabled =
|
||||
exportAsToolStripMenuItem.Enabled =
|
||||
changeTileToolStripMenuItem.Enabled =
|
||||
InterpolationCheckbox.Visible = !IsSpecialTile(_tileName);
|
||||
ValidateToolStrip();
|
||||
|
||||
SetTileLabel();
|
||||
SetTileLabel();
|
||||
LoadAnimationTreeView();
|
||||
}
|
||||
|
||||
@@ -127,12 +132,17 @@ namespace PckStudio.Forms.Editor
|
||||
animationPictureBox.SelectFrame(_animation, frameTreeView.SelectedNode.Index);
|
||||
}
|
||||
|
||||
private void StopAnimation()
|
||||
{
|
||||
animationPictureBox.Stop();
|
||||
AnimationStartStopBtn.Text = "Play Animation";
|
||||
}
|
||||
|
||||
private void AnimationStartStopBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (animationPictureBox.IsPlaying)
|
||||
{
|
||||
animationPictureBox.Stop();
|
||||
AnimationStartStopBtn.Text = "Play Animation";
|
||||
StopAnimation();
|
||||
return;
|
||||
}
|
||||
if (_animation.FrameCount > 1)
|
||||
@@ -341,6 +351,7 @@ namespace PckStudio.Forms.Editor
|
||||
|
||||
private void changeTileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
StopAnimation();
|
||||
using (ChangeTile diag = new ChangeTile())
|
||||
{
|
||||
if (diag.ShowDialog(this) != DialogResult.OK)
|
||||
@@ -350,10 +361,7 @@ namespace PckStudio.Forms.Editor
|
||||
_animation.Category = diag.Category;
|
||||
_tileName = diag.SelectedTile;
|
||||
|
||||
bulkAnimationSpeedToolStripMenuItem.Enabled =
|
||||
importToolStripMenuItem.Enabled =
|
||||
exportAsToolStripMenuItem.Enabled =
|
||||
InterpolationCheckbox.Visible = !IsSpecialTile(_tileName);
|
||||
ValidateToolStrip();
|
||||
|
||||
SetTileLabel();
|
||||
}
|
||||
@@ -468,7 +476,11 @@ namespace PckStudio.Forms.Editor
|
||||
gif.SelectActiveFrame(dimension, i);
|
||||
textures.Add(new Bitmap(gif));
|
||||
}
|
||||
|
||||
var animCat = _animation.Category;
|
||||
|
||||
_animation = new Animation(textures, string.Empty);
|
||||
_animation.Category = animCat;
|
||||
LoadAnimationTreeView();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user