This commit is contained in:
Flameshadowxeroshin
2013-03-24 12:44:50 -05:00
4 changed files with 25 additions and 0 deletions
+5
View File
@@ -8,6 +8,11 @@ ________________________________________________________________________________
StepMania 5.0 beta 2 | 20130???
--------------------------------------------------------------------------------
2013/03/24
----------
* [MusicWheel] Add the ChangeSort method to the Lua interface to allow the
theme to switch sorting methods.
2013/02/04
----------
* [Player] Add a "Column" parameter to the StepMessage to allow the theme or
+3
View File
@@ -2610,6 +2610,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<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=''>
Returns <code>true</code> if the MusicWheel is currently handling Roulette selection.
</Function>
+14
View File
@@ -1626,6 +1626,16 @@ void MusicWheel::FinishChangingSorts()
class LunaMusicWheel: public Luna<MusicWheel>
{
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 SelectSong( T* p, lua_State *L )
{
@@ -1651,12 +1661,16 @@ public:
LunaMusicWheel()
{
ADD_METHOD( ChangeSort );
ADD_METHOD( IsRouletting );
ADD_METHOD( SelectSong );
ADD_METHOD( SelectCourse );
}
};
LUA_REGISTER_DERIVED_CLASS( MusicWheel, WheelBase )
// lua end
/*
* (c) 2001-2004 Chris Danford, Chris Gomez, Glenn Maynard
* All rights reserved.
+3
View File
@@ -50,6 +50,9 @@ public:
RString JumpToPrevGroup();
const MusicWheelItemData *GetCurWheelItemData( int i ) { return (const MusicWheelItemData *) m_CurWheelItemData[i]; }
// Lua
void PushSelf( lua_State *L );
protected:
MusicWheelItem *MakeItem();