antirez / load81

SDL based Lua programming environment for kids similar to Codea
BSD 2-Clause "Simplified" License
599 stars 62 forks source link

Feature request: Programmatically Return to Editor #43

Open seclorum opened 12 years ago

seclorum commented 12 years ago

One thing that I have left to do with regards to Joystick support for the Pandora is to allow the programmer to set the 'nub' mode of the Open Pandora controls, which can be configured on the fly to act as either joysticks, nub0=mouse/nub1=mouse buttons, buttons, and so on. In order to facilitate this mode switch, however, the Program would have to be reset after the mode switch - one easy, user-friendly way to do this would be to have a "return_to_editor()" function call available that would end the program and, as suggested by the descriptive name, return to the Lua editor. It might also be an interesting way to build apps that encourage continued programming by the user. :)

antirez commented 12 years ago

That's a good idea indeed, so we may add editor() and reset(), the first just returning to the editor, and the second equivalent to press two times the ESC key for a complete program reset? Thanks for the good suggestion.

seclorum commented 12 years ago

Seems about right to me .. only I'd preface the method names with load81_editor() and load81_reset(), just to avoid the confusion, Bruce ..