add lua bindings
This commit is contained in:
@@ -13,10 +13,13 @@
|
||||
#include "Style.h"
|
||||
#include "RageTexture.h"
|
||||
#include "CourseEntryDisplay.h"
|
||||
#include "ActorUtil.h"
|
||||
|
||||
const int MAX_VISIBLE_ITEMS = 5;
|
||||
const int MAX_ITEMS = MAX_VISIBLE_ITEMS+2;
|
||||
|
||||
REGISTER_ACTOR_CLASS( CourseContentsList )
|
||||
|
||||
CourseContentsList::CourseContentsList()
|
||||
{
|
||||
for( int i=0; i<MAX_ITEMS; i++ )
|
||||
@@ -40,6 +43,13 @@ void CourseContentsList::Load()
|
||||
}
|
||||
}
|
||||
|
||||
void CourseContentsList::LoadFromNode( const CString& sDir, const XNode* pNode )
|
||||
{
|
||||
ActorScroller::LoadFromNode( sDir, pNode );
|
||||
|
||||
Load();
|
||||
}
|
||||
|
||||
void CourseContentsList::SetFromGameState()
|
||||
{
|
||||
RemoveAllChildren();
|
||||
@@ -109,6 +119,27 @@ void CourseContentsList::TweenInAfterChangedCourse()
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
class LunaCourseContentsList: public Luna<CourseContentsList>
|
||||
{
|
||||
public:
|
||||
LunaCourseContentsList() { LUA->Register( Register ); }
|
||||
|
||||
static int SetFromGameState( T* p, lua_State *L ) { p->SetFromGameState(); return 0; }
|
||||
|
||||
static void Register(lua_State *L)
|
||||
{
|
||||
ADD_METHOD( SetFromGameState )
|
||||
Luna<T>::Register( L );
|
||||
}
|
||||
};
|
||||
|
||||
LUA_REGISTER_DERIVED_CLASS( CourseContentsList, ActorScroller )
|
||||
// lua end
|
||||
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
|
||||
Reference in New Issue
Block a user