1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-24 17:26:41 +00:00

copy missing texture params when cloning Element

This commit is contained in:
fgenesis 2023-03-19 15:18:11 +01:00
parent bbc6636c65
commit 04cb3bba11

View file

@ -2445,6 +2445,9 @@ void SceneEditor::cloneSelectedElement()
Element *e = dsq->game->createElement(e1->templateIdx, placer->position + Vector(40,40) + dist, e1->bgLayer, e1);
e->elementFlag = e1->elementFlag;
e->setElementEffectByIndex(e1->getElementEffectIndex());
e->texOff = e1->texOff;
e->repeatToFillScale = e1->repeatToFillScale;
e->refreshRepeatTextureToFill();
copy.push_back(e);
}
selectedElements.clear();
@ -2457,6 +2460,9 @@ void SceneEditor::cloneSelectedElement()
Element *e = dsq->game->createElement(e1->templateIdx, placer->position + Vector(40,40), e1->bgLayer, e1);
e->elementFlag = e1->elementFlag;
e->setElementEffectByIndex(e1->getElementEffectIndex());
e->texOff = e1->texOff;
e->repeatToFillScale = e1->repeatToFillScale;
e->refreshRepeatTextureToFill();
}
dsq->game->reconstructGrid();