Add ChangeSort method to Lua MusicWheel
This commit is contained in:
@@ -2610,6 +2610,9 @@ save yourself some time, copy this for undocumented things:
|
|||||||
</Function>
|
</Function>
|
||||||
</Class>
|
</Class>
|
||||||
<Class name='MusicWheel'>
|
<Class name='MusicWheel'>
|
||||||
|
<Function name='ChangeSort' return='bool' arguments='SortOrder so'>
|
||||||
|
Changes the sort order of the wheel. Returns <code>true</code> if the order was changed.
|
||||||
|
</Function>
|
||||||
<Function name='IsRouletting' return='bool' arguments=''>
|
<Function name='IsRouletting' return='bool' arguments=''>
|
||||||
Returns <code>true</code> if the MusicWheel is currently handling Roulette selection.
|
Returns <code>true</code> if the MusicWheel is currently handling Roulette selection.
|
||||||
</Function>
|
</Function>
|
||||||
|
|||||||
@@ -1626,6 +1626,16 @@ void MusicWheel::FinishChangingSorts()
|
|||||||
class LunaMusicWheel: public Luna<MusicWheel>
|
class LunaMusicWheel: public Luna<MusicWheel>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
static int ChangeSort( T* p, lua_State *L )
|
||||||
|
{
|
||||||
|
if( lua_isnil(L,1) ) { lua_pushboolean( L, false ); }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SortOrder so = Enum::Check<SortOrder>(L, 1);
|
||||||
|
lua_pushboolean( L, p->ChangeSort( so ) );
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
static int IsRouletting( T* p, lua_State *L ){ lua_pushboolean( L, p->IsRouletting() ); return 1; }
|
static int IsRouletting( T* p, lua_State *L ){ lua_pushboolean( L, p->IsRouletting() ); return 1; }
|
||||||
static int SelectSong( T* p, lua_State *L )
|
static int SelectSong( T* p, lua_State *L )
|
||||||
{
|
{
|
||||||
@@ -1651,6 +1661,7 @@ public:
|
|||||||
|
|
||||||
LunaMusicWheel()
|
LunaMusicWheel()
|
||||||
{
|
{
|
||||||
|
ADD_METHOD( ChangeSort );
|
||||||
ADD_METHOD( IsRouletting );
|
ADD_METHOD( IsRouletting );
|
||||||
ADD_METHOD( SelectSong );
|
ADD_METHOD( SelectSong );
|
||||||
ADD_METHOD( SelectCourse );
|
ADD_METHOD( SelectCourse );
|
||||||
|
|||||||
Reference in New Issue
Block a user