ScreenWithMenuElementsSimple

This commit is contained in:
Glenn Maynard
2006-06-24 18:06:05 +00:00
parent 42b53d9334
commit bd2246f8ae
2 changed files with 48 additions and 0 deletions
+32
View File
@@ -314,6 +314,24 @@ void ScreenWithMenuElements::StopTimer()
m_MenuTimer->Stop();
}
REGISTER_SCREEN_CLASS( ScreenWithMenuElementsSimple );
void ScreenWithMenuElementsSimple::MenuStart( PlayerNumber pn )
{
if( IsTransitioning() )
return;
StartTransitioningScreen( SM_GoToNextScreen );
}
void ScreenWithMenuElementsSimple::MenuBack( PlayerNumber pn )
{
if( IsTransitioning() )
return;
StartTransitioningScreen( SM_GoToPrevScreen );
}
// lua start
#include "LuaBinding.h"
@@ -329,6 +347,20 @@ public:
};
LUA_REGISTER_DERIVED_CLASS( ScreenWithMenuElements, Screen )
class LunaScreenWithMenuElementsSimple: public Luna<ScreenWithMenuElementsSimple>
{
public:
LunaScreenWithMenuElementsSimple() { LUA->Register( Register ); }
static void Register( Lua *L )
{
Luna<T>::Register( L );
}
};
LUA_REGISTER_DERIVED_CLASS( ScreenWithMenuElementsSimple, ScreenWithMenuElements )
// lua end
/*
+16
View File
@@ -68,6 +68,22 @@ private:
RString m_sPathToMusic;
};
class ScreenWithMenuElementsSimple: public ScreenWithMenuElements
{
public:
void MenuStart( PlayerNumber pn );
void MenuBack( PlayerNumber pn );
//
// Lua
//
virtual void PushSelf( lua_State *L );
protected:
virtual bool GenericTweenOn() const { return true; }
virtual bool GenericTweenOff() const { return true; }
};
#endif
/*