1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-29 03:33:48 +00:00

AnimationEditor: support copy absolute bone scale to clipboard

This commit is contained in:
fgenesis 2023-10-24 22:58:13 +02:00
parent a1037091ad
commit 83e3739340

View file

@ -209,6 +209,18 @@ void AnimationEditor::resetScaleOrSave()
if (core->getCtrlState())
saveFile();
else if(core->getAltState() && editingBone)
{
Vector scale(1,1);
Bone *b = editingBone;
do
scale *= b->scale;
while( (b = dynamic_cast<Bone*>(b->getParent())) ); // don't want to get entity scale; that's what the anim editor uses for zooming
std::ostringstream os;
os << scale.x;
if(!SDL_SetClipboardText(os.str().c_str()))
dsq->screenMessage("Scale copied to clipboard");
}
else
editSprite->scale = Vector(1,1);
}