How to show and hide screens from Lua
User Question :
There has GOT to be a way to switch between screens from Lua, but I can't figure it out.
I know how to do it from an action due to an action.
Can someone tell me how to do it, please?
There isn't a way to call a screen transition directly from Lua.
You can create a custom event such as "HOME_SCREEN" and then have it trigger a transition to the home screen when you call gre.send_event("HOME_SCREEN")
If there are too many screens and you don't want to set up an event for each screen you can create a generic "change_screen" event and have it trigger a transition at the application context and make the screen name a variable. Then simply set the variable with the new screen name and trigger the event.