Merge pull request #980 from kyzentun/pause_menu

Pause menu for default theme.
This commit is contained in:
Kyzentun
2016-01-14 16:56:49 -07:00
13 changed files with 276 additions and 5 deletions
+7
View File
@@ -273,6 +273,11 @@ void Screen::SetNextScreenName(RString const& name)
m_sNextScreen= name;
}
void Screen::SetPrevScreenName(RString const& name)
{
m_sPrevScreen= name;
}
RString Screen::GetPrevScreen() const
{
if( !m_sPrevScreen.empty() )
@@ -411,6 +416,7 @@ public:
static int GetNextScreenName( T* p, lua_State *L ) { lua_pushstring(L, p->GetNextScreenName() ); return 1; }
static int SetNextScreenName( T* p, lua_State *L ) { p->SetNextScreenName(SArg(1)); COMMON_RETURN_SELF; }
static int GetPrevScreenName( T* p, lua_State *L ) { lua_pushstring(L, p->GetPrevScreen() ); return 1; }
static int SetPrevScreenName( T* p, lua_State *L ) { p->SetPrevScreenName(SArg(1)); COMMON_RETURN_SELF; }
static int lockinput( T* p, lua_State *L ) { p->SetLockInputSecs(FArg(1)); COMMON_RETURN_SELF; }
DEFINE_METHOD( GetScreenType, GetScreenType() )
@@ -447,6 +453,7 @@ public:
ADD_METHOD( GetNextScreenName );
ADD_METHOD( SetNextScreenName );
ADD_METHOD( GetPrevScreenName );
ADD_METHOD( SetPrevScreenName );
ADD_METHOD( PostScreenMessage );
ADD_METHOD( lockinput );
ADD_METHOD( GetScreenType );
+1
View File
@@ -124,6 +124,7 @@ public:
RString GetNextScreenName() const;
RString GetPrevScreen() const;
void SetNextScreenName(RString const& name);
void SetPrevScreenName(RString const& name);
bool PassInputToLua(const InputEventPlus& input);
void AddInputCallbackFromStack(lua_State* L);
+6 -2
View File
@@ -1959,9 +1959,7 @@ void ScreenGameplay::Update( float fDeltaTime )
pi->GetPlayerStageStats()->m_bFailed |= bAllHumanHaveBigMissCombo;
pi->GetPlayerStageStats()->m_bDisqualified |= bGiveUpTimerFired; // Don't disqualify if failing for miss combo. The player should still be eligable for a high score on courses.
}
ResetGiveUpTimers(false);
if(GIVING_UP_GOES_TO_PREV_SCREEN && !m_skipped_song)
{
BeginBackingOutFromGameplay();
@@ -3267,6 +3265,11 @@ public:
FLOAT_TABLE_INTERFACE(HasteAddAmounts, HasteAddAmounts, AddAmountsValid);
FLOAT_NO_SPEED_INTERFACE(HasteTimeBetweenUpdates, HasteTimeBetweenUpdates, (v > 0));
FLOAT_NO_SPEED_INTERFACE(HasteLifeSwitchPoint, HasteLifeSwitchPoint, (v >= 0 && v <= 1));
static int begin_backing_out(T* p, lua_State* L)
{
p->BeginBackingOutFromGameplay();
COMMON_RETURN_SELF;
}
static int GetTrueBPS(T* p, lua_State* L)
{
PlayerNumber pn= Enum::Check<PlayerNumber>(L, 1);
@@ -3293,6 +3296,7 @@ public:
ADD_METHOD( HasteAddAmounts );
ADD_METHOD( HasteTimeBetweenUpdates );
ADD_METHOD( HasteLifeSwitchPoint );
ADD_METHOD(begin_backing_out);
ADD_METHOD( GetTrueBPS );
}
};
+1 -1
View File
@@ -176,6 +176,7 @@ public:
void FailFadeRemovePlayer(PlayerInfo* pi);
void FailFadeRemovePlayer(PlayerNumber pn);
void BeginBackingOutFromGameplay();
vector<float> m_HasteTurningPoints; // Values at which the meaning of GAMESTATE->m_fHasteRate changes.
vector<float> m_HasteAddAmounts; // Amounts that are added to speed depending on what turning point has been passed.
@@ -225,7 +226,6 @@ protected:
void PlayAnnouncer( const RString &type, float fSeconds ) { PlayAnnouncer(type, fSeconds, &m_fTimeSinceLastDancingComment); }
void UpdateLights();
void SendCrossedMessages();
void BeginBackingOutFromGameplay();
void PlayTicks();
void UpdateSongPosition( float fDeltaTime );
+1 -1
View File
@@ -1859,7 +1859,7 @@ void ScreenSelectMusic::AfterMusicChange()
case SampleMusicPreviewMode_LastSong: // fall through
// play the sample music
m_sSampleMusicToPlay = pSong->GetPreviewMusicPath();
if(ActorUtil::GetFileType(m_sSampleMusicToPlay) != FT_Sound)
if(!m_sSampleMusicToPlay.empty() && ActorUtil::GetFileType(m_sSampleMusicToPlay) != FT_Sound)
{
LuaHelpers::ReportScriptErrorFmt("Music file %s for song is not a sound file, ignoring.", m_sSampleMusicToPlay.c_str());
m_sSampleMusicToPlay= "";