1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-07-03 06:24:32 +00:00

anim editor: allow to select anim by name (no more hammering PgUp/PgDown!)

This commit is contained in:
fgenesis 2022-11-18 01:52:46 +01:00
parent 92ab459736
commit ed98a3328e
4 changed files with 34 additions and 0 deletions

View file

@ -1243,6 +1243,20 @@ void SkeletalSprite::firstAnimation()
animLayers[0].currentAnimation = 0;
}
bool SkeletalSprite::selectAnimation(const char* name)
{
for(size_t i = 0; i < animations.size(); ++i)
{
if(animations[i].name == name)
{
stopAnimation();
animLayers[0].currentAnimation = i;
return true;
}
}
return false;
}
void SkeletalSprite::lastAnimation()
{
stopAnimation();

View file

@ -277,6 +277,7 @@ public:
void prevAnimation();
void lastAnimation();
void firstAnimation();
bool selectAnimation(const char *name);
void updateSelectedBoneColor();