[BPMDisplay] Added SetFromCourse Lua binding.

This commit is contained in:
AJ Kelly
2011-05-10 09:30:03 -05:00
parent a867b88640
commit ce392f003c
2 changed files with 13 additions and 1 deletions
+2 -1
View File
@@ -10,7 +10,8 @@ StepMania 5.0 $NEXT | 20110xyy
2011/05/10
----------
* [Sprite] Added SetSecondsIntoAnimation(float) Lua binding. [AJ]
* [Sprite] Added SetSecondsIntoAnimation Lua binding. [AJ]
* [BPMDisplay] Added SetFromCourse Lua binding. [AJ]
2011/05/03
----------
+11
View File
@@ -305,12 +305,23 @@ public:
}
return 0;
}
static int SetFromCourse( T* p, lua_State *L )
{
if( lua_isnil(L,1) ) { p->NoBPM(); }
else
{
const Course* pCourse = Luna<Course>::check( L, 1, true );
p->SetBpmFromCourse(pCourse);
}
return 0;
}
static int GetText( T* p, lua_State *L ) { lua_pushstring( L, p->GetText() ); return 1; }
LunaBPMDisplay()
{
ADD_METHOD( SetFromGameState );
ADD_METHOD( SetFromSong );
ADD_METHOD( SetFromCourse );
ADD_METHOD( GetText );
}
};