Animation now has correct visual display and input feedback. Loading GIF guesses it's an anim if it loops, layers otherwise : Some rare non-looping GIF anims (usaully broken) will be misunderstood as layered. Editing of anims and layers seems flawless and stable. Still requires an auto-switch to the best toolbar (anim/layers) when relevant, but you can already switch manually.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1910 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
@@ -548,11 +548,23 @@ void Button_Toggle_toolbar(void)
|
||||
case 0: // tools
|
||||
Set_bar_visibility(MENUBAR_TOOLS, !Menu_bars[MENUBAR_TOOLS].Visible);
|
||||
break;
|
||||
case 1: // anim
|
||||
case 1: // layers
|
||||
if (Menu_bars[MENUBAR_ANIMATION].Visible && !Menu_bars[MENUBAR_LAYERS].Visible)
|
||||
Set_bar_visibility(MENUBAR_ANIMATION, 0);
|
||||
Set_bar_visibility(MENUBAR_LAYERS, !Menu_bars[MENUBAR_LAYERS].Visible);
|
||||
|
||||
if (Main_backups->Pages->Image_mode == IMAGE_MODE_ANIMATION)
|
||||
{
|
||||
// Exceptionally, this doesn't require a backup because a single-layer
|
||||
// image is the same as a single-frame animation.
|
||||
Main_backups->Pages->Image_mode = IMAGE_MODE_LAYERED;
|
||||
}
|
||||
break;
|
||||
case 2: // anim
|
||||
if (Menu_bars[MENUBAR_LAYERS].Visible && !Menu_bars[MENUBAR_ANIMATION].Visible)
|
||||
Set_bar_visibility(MENUBAR_LAYERS, 0);
|
||||
Set_bar_visibility(MENUBAR_ANIMATION, !Menu_bars[MENUBAR_ANIMATION].Visible);
|
||||
|
||||
if (Main_backups->Pages->Image_mode == IMAGE_MODE_LAYERED)
|
||||
{
|
||||
// Exceptionally, this doesn't require a backup because a single-frame
|
||||
@@ -560,18 +572,6 @@ void Button_Toggle_toolbar(void)
|
||||
Main_backups->Pages->Image_mode = IMAGE_MODE_ANIMATION;
|
||||
}
|
||||
|
||||
break;
|
||||
case 2: // layers
|
||||
if (Menu_bars[MENUBAR_LAYERS].Visible && !Menu_bars[MENUBAR_ANIMATION].Visible)
|
||||
Set_bar_visibility(MENUBAR_LAYERS, 0);
|
||||
Set_bar_visibility(MENUBAR_ANIMATION, !Menu_bars[MENUBAR_ANIMATION].Visible);
|
||||
|
||||
if (Main_backups->Pages->Image_mode == IMAGE_MODE_ANIMATION)
|
||||
{
|
||||
// Exceptionally, this doesn't require a backup because a single-layer
|
||||
// image is the same as a single-frame animation.
|
||||
Main_backups->Pages->Image_mode = IMAGE_MODE_LAYERED;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user