Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pause()
- tmp = screen.toimage() --first make a screenshot
- while true do --start the pause loop
- controls.read() --read the controls
- tmp:blit(0,0) --blit the tmp image
- -----------------Here your stuff
- -------If you want to use your own images, delete tmp = screen.toimage() and tmp:blit(0,0) and tmp:free()
- --if you want to return to the menu pressing triangle for example and the menu is main_menu() function:
- if controls.press("triangle") theen
- --first free the tmp image
- main_menu() --return to the main menu
- end
- --------------------------------
- if controls.press("start") or controls.press("circle") then
- break --breaks this bucle so the game continues
- end
- screen.flip() --swap buffers
- end --end the puase loop
- tmp:free() --free the tmp image
- end
- --the while true do
- while true do
- controls.read()
- if controsls.press("start") then --when press start
- pause() -- Pause :)
- end
- if controls.select() then make_error() end-- This make an error so when luadev gets an error, it connects to usb,
- --then you can update your code and if you press cross luadev will restart
- -- and your code will be updasted without returning to the xmb
- screen.flip()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement