Add MusicWheel:IsRouletting and WheelBase:GetNumWheelItems Lua bindings.

This commit is contained in:
AJ Kelly
2011-12-27 11:03:02 -06:00
parent a191da3f20
commit ec74678b70
3 changed files with 21 additions and 0 deletions
+5
View File
@@ -8,6 +8,11 @@ ________________________________________________________________________________
StepMania 5.0 $next | 20111xxx
--------------------------------------------------------------------------------
2011/12/27
----------
* [MusicWheel] Add
* [WheelBase] Add GetNumWheelItems Lua binding. [AJ]
2011/12/26
----------
* [ArchHooks_OSX] Worked around a crash when language detection goes wrong.
+14
View File
@@ -1602,6 +1602,20 @@ void MusicWheel::FinishChangingSorts()
m_fTimeLeftInState = 0;
}
// lua start
#include "LuaBinding.h"
class LunaMusicWheel: public Luna<MusicWheel>
{
public:
static int IsRouletting( T* p, lua_State *L ){ lua_pushboolean( L, p->IsRouletting() ); return 1; }
LunaMusicWheel()
{
ADD_METHOD( IsRouletting );
}
};
/*
* (c) 2001-2004 Chris Danford, Chris Gomez, Glenn Maynard
* All rights reserved.
+2
View File
@@ -521,6 +521,7 @@ public:
return 1;
}
static int GetNumWheelItems( T* p, lua_State *L ){ lua_pushnumber( L, p->GetNumItems() ); return 1; }
static int IsSettled( T* p, lua_State *L ){ lua_pushboolean( L, p->IsSettled() ); return 1; }
static int IsLocked( T* p, lua_State *L ){ lua_pushboolean( L, p->WheelIsLocked() ); return 1; }
static int SetOpenSection( T* p, lua_State *L ){ p->SetOpenSection( SArg(1) ); return 0; }
@@ -538,6 +539,7 @@ public:
LunaWheelBase()
{
ADD_METHOD( GetWheelItem );
ADD_METHOD( GetNumWheelItems );
ADD_METHOD( IsSettled );
ADD_METHOD( IsLocked );
ADD_METHOD( SetOpenSection );