[BPMDisplay] Added SetFromSong Lua binding.
This commit is contained in:
@@ -18,6 +18,7 @@ sm-ssc v1.2.5 | 201104??
|
|||||||
* [BeginnerHelper] Various changes: [AJ]
|
* [BeginnerHelper] Various changes: [AJ]
|
||||||
* Changed Player_#X/Y metrics to Player#X/Y metrics for consistency.
|
* Changed Player_#X/Y metrics to Player#X/Y metrics for consistency.
|
||||||
* Converted the background to an AutoActor.
|
* Converted the background to an AutoActor.
|
||||||
|
* [BPMDisplay] Added SetFromSong Lua binding. [AJ]
|
||||||
|
|
||||||
20110423
|
20110423
|
||||||
--------
|
--------
|
||||||
|
|||||||
@@ -294,11 +294,22 @@ class LunaBPMDisplay: public Luna<BPMDisplay>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static int SetFromGameState( T* p, lua_State *L ) { p->SetFromGameState(); return 0; }
|
static int SetFromGameState( T* p, lua_State *L ) { p->SetFromGameState(); return 0; }
|
||||||
|
static int SetFromSong( T* p, lua_State *L )
|
||||||
|
{
|
||||||
|
if( lua_isnil(L,1) ) { p->NoBPM(); }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const Song* pSong = Luna<Song>::check( L, 1, true );
|
||||||
|
p->SetBpmFromSong(pSong);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
static int GetText( T* p, lua_State *L ) { lua_pushstring( L, p->GetText() ); return 1; }
|
static int GetText( T* p, lua_State *L ) { lua_pushstring( L, p->GetText() ); return 1; }
|
||||||
|
|
||||||
LunaBPMDisplay()
|
LunaBPMDisplay()
|
||||||
{
|
{
|
||||||
ADD_METHOD( SetFromGameState );
|
ADD_METHOD( SetFromGameState );
|
||||||
|
ADD_METHOD( SetFromSong );
|
||||||
ADD_METHOD( GetText );
|
ADD_METHOD( GetText );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user