This commit is contained in:
kepler155c@gmail.com
2020-04-12 18:46:26 -06:00
parent 775871c548
commit 9eeec8719c
8 changed files with 191 additions and 199 deletions

View File

@@ -1096,6 +1096,14 @@ function UI.Device:addTransition(effect, args, canvas)
effect = Transition[effect] or error('Invalid transition')
end
-- there can be only one
for k,v in pairs(self.transitions) do
if v.canvas == canvas then
table.remove(self.transitions, k)
break
end
end
table.insert(self.transitions, { effect = effect, args = args or { }, canvas = canvas })
end