Added frame merging

This commit is contained in:
LDDestroier 2018-11-08 20:30:34 -05:00 committed by GitHub
parent ebff92f93c
commit 94a7cbc846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 2 deletions

View File

@ -2961,8 +2961,26 @@ local getInput = function() --gotta catch them all
saveToUndoBuffer()
end
end
end
if not keysDown[keys.leftAlt] then
elseif keysDown[keys.leftShift] then
if #paintEncoded > 1 then
if key == keys.equals and paintEncoded[frame+1] then --basically plus
for a = 1, #paintEncoded[frame+1] do
paintEncoded[frame][#paintEncoded[frame] + 1] = paintEncoded[frame+1][a]
end
table.remove(paintEncoded, frame+1)
paintEncoded = clearAllRedundant(paintEncoded)
barmsg = "Merged next frame."
end
if key == keys.minus and paintEncoded[frame-1] then
for a = 1, #paintEncoded[frame+1] do
paintEncoded[frame][#paintEncoded[frame] + 1] = paintEncoded[frame-1][a]
end
table.remove(paintEncoded, frame-1)
paintEncoded = clearAllRedundant(paintEncoded)
barmsg = "Merged previous frame."
end
end
else
if key == keys.equals then --basically 'plus'
if renderBlittle then
frame = frame + 1