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:
parent
92ab459736
commit
ed98a3328e
4 changed files with 34 additions and 0 deletions
|
@ -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();
|
||||
|
|
|
@ -277,6 +277,7 @@ public:
|
|||
void prevAnimation();
|
||||
void lastAnimation();
|
||||
void firstAnimation();
|
||||
bool selectAnimation(const char *name);
|
||||
void updateSelectedBoneColor();
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue