diff --git a/Docs/Luadoc/Lua.xml b/Docs/Luadoc/Lua.xml index b6c1f67c0f..9cb9246d2f 100644 --- a/Docs/Luadoc/Lua.xml +++ b/Docs/Luadoc/Lua.xml @@ -1382,6 +1382,7 @@ + diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml index 5d412831ae..7c5bd89a8d 100644 --- a/Docs/Luadoc/LuaDocumentation.xml +++ b/Docs/Luadoc/LuaDocumentation.xml @@ -3924,6 +3924,9 @@ save yourself some time, copy this for undocumented things: Tells the screen to go to the previous screen. + + Tells the screen to go to play its Out transition, and then posts the ScreenMessage sScreenMsg. To go to the next screen, use "SM_GoToNextScreen" as the argument. + Sets whether the screen allows late joining. This only works for screens that are just ScreenWithMenuElements, as most derived screens have their own hard coded function for whether late joining is allowed. diff --git a/src/ScreenWithMenuElements.cpp b/src/ScreenWithMenuElements.cpp index 21bfbd140e..85ac309110 100644 --- a/src/ScreenWithMenuElements.cpp +++ b/src/ScreenWithMenuElements.cpp @@ -384,12 +384,20 @@ public: return 0; } + static int StartTransitioningScreen( T* p, lua_State *L ) + { + RString sMessage = SArg(1); + ScreenMessage SM = ScreenMessageHelpers::ToScreenMessage( sMessage ); + p->StartTransitioningScreen( SM ); + return 0; + } LunaScreenWithMenuElements() { ADD_METHOD( Cancel ); ADD_METHOD( IsTransitioning ); ADD_METHOD( SetAllowLateJoin ); + ADD_METHOD( StartTransitioningScreen ); } };