[WheelBase, WheelItemBase] Turned WheelItemDataType into a Lua type, made WheelBase:GetSelectedType() return the enum instead of a number.
This commit is contained in:
@@ -8,6 +8,11 @@ ________________________________________________________________________________
|
|||||||
StepMania 5.0 alpha 1a | 201202??
|
StepMania 5.0 alpha 1a | 201202??
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
2012/02/10
|
||||||
|
----------
|
||||||
|
* [WheelBase, WheelItemBase] Turned WheelItemDataType into a Lua type,
|
||||||
|
made WheelBase:GetSelectedType() return the enum instead of a number. [AJ]
|
||||||
|
|
||||||
2012/02/08
|
2012/02/08
|
||||||
----------
|
----------
|
||||||
* [ScreenOptionsMaster] Added StepsRowLayoutType metric.
|
* [ScreenOptionsMaster] Added StepsRowLayoutType metric.
|
||||||
|
|||||||
+1
-4
@@ -530,10 +530,7 @@ public:
|
|||||||
//static int Move( T* p, lua_State *L ){ p->Move( IArg(1) ); return 0; }
|
//static int Move( T* p, lua_State *L ){ p->Move( IArg(1) ); return 0; }
|
||||||
//static int ChangeMusic( T* p, lua_State *L ){ p->ChangeMusicUnlessLocked( IArg(1) ); return 0; }
|
//static int ChangeMusic( T* p, lua_State *L ){ p->ChangeMusicUnlessLocked( IArg(1) ); return 0; }
|
||||||
|
|
||||||
static int GetSelectedType( T* p, lua_State *L ) {
|
DEFINE_METHOD( GetSelectedType, GetSelectedType() )
|
||||||
lua_pushnumber( L, p->GetSelectedType() );
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
LunaWheelBase()
|
LunaWheelBase()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "WheelItemBase.h"
|
#include "WheelItemBase.h"
|
||||||
|
#include "LuaManager.h"
|
||||||
|
|
||||||
|
static const char *WheelItemDataTypeNames[] = {
|
||||||
|
"Generic",
|
||||||
|
"Section",
|
||||||
|
"Song",
|
||||||
|
"Roulette",
|
||||||
|
"Random",
|
||||||
|
"Portal",
|
||||||
|
"Course",
|
||||||
|
"Sort",
|
||||||
|
"Custom",
|
||||||
|
};
|
||||||
|
XToString( WheelItemDataType );
|
||||||
|
StringToX( WheelItemDataType );
|
||||||
|
LuaXType( WheelItemDataType );
|
||||||
|
|
||||||
WheelItemBaseData::WheelItemBaseData( WheelItemDataType type, RString sText, RageColor color )
|
WheelItemBaseData::WheelItemBaseData( WheelItemDataType type, RString sText, RageColor color )
|
||||||
{
|
{
|
||||||
|
|||||||
+3
-1
@@ -19,7 +19,9 @@ enum WheelItemDataType
|
|||||||
WheelItemDataType_Portal, /**< The portal section on the Wheel. */
|
WheelItemDataType_Portal, /**< The portal section on the Wheel. */
|
||||||
WheelItemDataType_Course, /**< A Course on the Wheel. */
|
WheelItemDataType_Course, /**< A Course on the Wheel. */
|
||||||
WheelItemDataType_Sort, /**< A generic sorting item on the Wheel. */
|
WheelItemDataType_Sort, /**< A generic sorting item on the Wheel. */
|
||||||
WheelItemDataType_Custom /**< A custom item on the Wheel. */
|
WheelItemDataType_Custom, /**< A custom item on the Wheel. */
|
||||||
|
NUM_WheelItemDataType,
|
||||||
|
WheelItemDataType_Invalid
|
||||||
};
|
};
|
||||||
LuaDeclareType( WheelItemDataType );
|
LuaDeclareType( WheelItemDataType );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user