GetNextScreen -> GetNextScreenName (makes return type more clear in Lua)
This commit is contained in:
@@ -209,7 +209,7 @@ void Screen::HandleScreenMessage( const ScreenMessage SM )
|
||||
if( SCREENMAN->IsStackedScreen(this) )
|
||||
SCREENMAN->PopTopScreen( m_smSendOnPop );
|
||||
else
|
||||
SCREENMAN->SetNewScreen( SM == SM_GoToNextScreen? GetNextScreen():GetPrevScreen() );
|
||||
SCREENMAN->SetNewScreen( SM == SM_GoToNextScreen? GetNextScreenName():GetPrevScreen() );
|
||||
}
|
||||
else if( SM == SM_GainFocus )
|
||||
{
|
||||
@@ -226,7 +226,7 @@ void Screen::HandleScreenMessage( const ScreenMessage SM )
|
||||
}
|
||||
}
|
||||
|
||||
RString Screen::GetNextScreen() const
|
||||
RString Screen::GetNextScreenName() const
|
||||
{
|
||||
if( !m_sNextScreen.empty() )
|
||||
return m_sNextScreen;
|
||||
@@ -266,7 +266,7 @@ void Screen::ClearMessageQueue( const ScreenMessage SM )
|
||||
class LunaScreen: public Luna<Screen>
|
||||
{
|
||||
public:
|
||||
static int GetNextScreen( T* p, lua_State *L ) { lua_pushstring(L, p->GetNextScreen() ); return 1; }
|
||||
static int GetNextScreenName( T* p, lua_State *L ) { lua_pushstring(L, p->GetNextScreenName() ); return 1; }
|
||||
static int lockinput( T* p, lua_State *L ) { p->SetLockInputSecs(FArg(1)); return 0; }
|
||||
|
||||
static int PostScreenMessage( T* p, lua_State *L )
|
||||
@@ -279,7 +279,7 @@ public:
|
||||
|
||||
LunaScreen()
|
||||
{
|
||||
ADD_METHOD( GetNextScreen );
|
||||
ADD_METHOD( GetNextScreenName );
|
||||
ADD_METHOD( PostScreenMessage );
|
||||
ADD_METHOD( lockinput );
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ protected:
|
||||
float m_fLockInputSecs;
|
||||
|
||||
public:
|
||||
RString GetNextScreen() const;
|
||||
RString GetNextScreenName() const;
|
||||
RString GetPrevScreen() const;
|
||||
|
||||
// let subclass override if they want
|
||||
|
||||
@@ -138,7 +138,7 @@ void ScreenAttract::HandleScreenMessage( const ScreenMessage SM )
|
||||
* going to interrupt it when we fade in, stop the old music before we fade out. */
|
||||
bool bMusicChanging = false;
|
||||
if( PLAY_MUSIC )
|
||||
bMusicChanging = THEME->GetPathS(m_sName,"music") != THEME->GetPathS(GetNextScreen(),"music",true); // GetPath optional on the next screen because it may not have music.
|
||||
bMusicChanging = THEME->GetPathS(m_sName,"music") != THEME->GetPathS(GetNextScreenName(),"music",true); // GetPath optional on the next screen because it may not have music.
|
||||
|
||||
if( bMusicChanging )
|
||||
SOUND->StopMusic();
|
||||
|
||||
@@ -533,7 +533,7 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM )
|
||||
m_sNextScreen = sThisScreen;
|
||||
|
||||
// If options set a NextScreen or one is specified in metrics, then fade out
|
||||
if( GetNextScreen() == "" )
|
||||
if( GetNextScreenName() == "" )
|
||||
{
|
||||
LOG->Warn( "%s::HandleScreenMessage: Tried to fade out, but we have no next screen", m_sName.c_str() );
|
||||
return;
|
||||
|
||||
@@ -127,7 +127,7 @@ void ScreenOptionsMaster::HandleScreenMessage( const ScreenMessage SM )
|
||||
* only reload it if it changed. */
|
||||
RString sNewTheme = PREFSMAN->m_sTheme.Get();
|
||||
bool bForceThemeReload = !!(m_iChangeMask & OPT_APPLY_ASPECT_RATIO) || !!(m_iChangeMask & OPT_APPLY_GRAPHICS);
|
||||
GameLoop::ChangeTheme( sNewTheme, this->GetNextScreen(), bForceThemeReload );
|
||||
GameLoop::ChangeTheme( sNewTheme, this->GetNextScreenName(), bForceThemeReload );
|
||||
StepMania::ApplyGraphicOptions();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ void ScreenSplash::HandleScreenMessage( const ScreenMessage SM )
|
||||
{
|
||||
RageTimer length;
|
||||
if( PREPARE_SCREEN )
|
||||
SCREENMAN->PrepareScreen( GetNextScreen() );
|
||||
SCREENMAN->PrepareScreen( GetNextScreenName() );
|
||||
float fScreenLoadSeconds = length.GetDeltaTime();
|
||||
|
||||
/* The screen load took fScreenLoadSeconds. Move on to the next screen after
|
||||
|
||||
@@ -55,7 +55,7 @@ void ScreenStage::HandleScreenMessage( const ScreenMessage SM )
|
||||
if( SM == SM_PrepScreen )
|
||||
{
|
||||
RageTimer length;
|
||||
SCREENMAN->PrepareScreen( GetNextScreen() );
|
||||
SCREENMAN->PrepareScreen( GetNextScreenName() );
|
||||
float fScreenLoadSeconds = length.GetDeltaTime();
|
||||
|
||||
/* The screen load took fScreenLoadSeconds. Move on to the next screen after
|
||||
|
||||
Reference in New Issue
Block a user