@Simeon I’ve been playing around with pasteboard a lot and it’s a very handy feature. In some of my projects, I switch to another app, copy text/image and switch back to Codea. I was wondering if it would be possible to have a Codea function that gets called when switching back to Codea from another app. This would be handy for pasteboard use as well as calling pause states in a game if the project is left.
Something like:
function onEnter() --Called when Codea is switched to from another app.
str = pasteboard.text
gamePaused = true
end
I’ve been using this bit of code to accomplish the above. This works because Codea stops drawing when the project is left.
-- in draw()
local t = tonumber(os.date("%S"))
if t - LoopTime > 1 then
--do something
end
LoopTime = t