1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 09:44:02 +00:00

Use multiplicative scaling in anim editor for a more uniform feel

This commit is contained in:
fgenesis 2023-05-05 03:49:14 +02:00
parent 6d6697fd72
commit c73aa23906

View file

@ -735,27 +735,28 @@ void AnimationEditor::update(float dt)
if (isActing(ACTION_SWIMDOWN, -1))
moveBoneStripPoint(Vector(0, dt));
}
int spd = 1;
float spd = 1.0f;
if (core->mouse.scrollWheelChange < 0)
{
ctrlSprite->scale -= Vector(spd*0.05f,spd*0.05f);
ctrlSprite->scale.x /= 1.12f;
}
else if (core->mouse.scrollWheelChange > 0)
{
ctrlSprite->scale += Vector(spd*0.05f,spd*0.05f);
ctrlSprite->scale.x *= 1.12f;
}
if (core->getKeyState(KEY_PGDN) && core->getShiftState())
{
ctrlSprite->scale -= Vector(spd*0.05f,spd*0.05f);
ctrlSprite->scale.x /= (1 + spd*dt);
}
if (core->getKeyState(KEY_PGUP) && core->getShiftState())
{
ctrlSprite->scale += Vector(spd*0.05f,spd*0.05f);
ctrlSprite->scale.x *= (1 + spd*dt);
}
if (ctrlSprite->scale.x < 0.05f)
{
ctrlSprite->scale = Vector(0.05f,0.05f);
ctrlSprite->scale.x = 0.05f;
}
ctrlSprite->scale.y = ctrlSprite->scale.x;
if (boneEdit == 0)
{