StartTransitioningScreen

Exposes the StartTransitioningScreen function to lua. Great utility for
custom screens.
This commit is contained in:
sigatrev
2014-04-02 18:35:23 -05:00
parent 37f6b99571
commit b8e4cdddec
3 changed files with 12 additions and 0 deletions
+1
View File
@@ -1382,6 +1382,7 @@
</Class>
<Class base='Screen' name='ScreenWithMenuElements'>
<Function name='Cancel'/>
<Function name='StartTransitioningScreen'/>
<Function name='SetAllowLateJoin'/>
</Class>
<Class base='ScreenWithMenuElements' name='ScreenWithMenuElementsSimple'/>
+3
View File
@@ -3924,6 +3924,9 @@ save yourself some time, copy this for undocumented things:
<Function name='Cancel' return='void' arguments=''>
Tells the screen to go to the previous screen.
</Function>
<Function name='StartTransitioningScreen' return='void' arguments='string sScreenMsg'>
Tells the screen to go to play its Out transition, and then posts the ScreenMessage <code>sScreenMsg</code>. To go to the next screen, use "SM_GoToNextScreen" as the argument.
</Function>
<Function name='SetAllowLateJoin' return='void' arguments='bool'>
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.
</Function>
+8
View File
@@ -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 );
}
};