Added pause menu to ScreenGameplay in default theme. Added SetPrevScreenName lua binding to Screen. Added begin_backing_out lua binding to ScreenGameplay.

This commit is contained in:
Kyzentun Keeslala
2016-01-09 11:40:22 -07:00
parent 14caac26ca
commit 0de66f6e1a
11 changed files with 247 additions and 4 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 );