GetNextScreen -> GetNextScreenName (makes return type more clear in Lua)

This commit is contained in:
Chris Danford
2007-08-25 03:13:16 +00:00
parent 06212434a5
commit 09e3f1872e
7 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -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 );
}
+1 -1
View File
@@ -88,7 +88,7 @@ protected:
float m_fLockInputSecs;
public:
RString GetNextScreen() const;
RString GetNextScreenName() const;
RString GetPrevScreen() const;
// let subclass override if they want
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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();
}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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