Render animation fixes, vs code tasks

This commit is contained in:
2026-03-15 13:22:53 -04:00
parent 1b5ba6b584
commit bbfafd7331
10 changed files with 102 additions and 16 deletions
+3 -2
View File
@@ -1780,11 +1780,12 @@ namespace anm2ed::imgui
if (ImGui::Button(localize.get(BASIC_ADD), widgetSize))
{
anm2::Reference addReference{};
int insertBeforeID = reference.itemType == anm2::LAYER ? reference.itemID : -1;
document.snapshot(localize.get(EDIT_ADD_ITEM));
if (type == anm2::LAYER)
addReference = anm2.layer_animation_add({reference.animationIndex, anm2::LAYER, addItemID}, addItemName,
addItemSpritesheetID, (destination::Type)destination);
addReference = anm2.layer_animation_add({reference.animationIndex, anm2::LAYER, addItemID}, insertBeforeID,
addItemName, addItemSpritesheetID, (destination::Type)destination);
else if (type == anm2::NULL_)
addReference = anm2.null_animation_add({reference.animationIndex, anm2::NULL_, addItemID}, addItemName,
addItemIsShowRect, (destination::Type)destination);