How to show and hide screens from Lua

Questions and information about using Lua scripting with Storyboard

Moderator: jamiev

How to show and hide screens from Lua

Postby paulschutte » Thu Apr 04, 2019 5:26 pm

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?
Posts: 4
Joined: Tue Mar 12, 2019 10:54 am

Re: How to show and hide screens from Lua

Postby jason » Thu Apr 04, 2019 7:23 pm

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.

2019-04-04_20-21-27.png (73.73 KiB) Viewed 1247 times
User avatar
Posts: 196
Joined: Mon Nov 02, 2009 4:53 pm

Return to Lua Scripting

Who is online

Users browsing this forum: No registered users and 1 guest