StartTransitioningScreen
Exposes the StartTransitioningScreen function to lua. Great utility for custom screens.
This commit is contained in:
@@ -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'/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user