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