[WheelItemBase] Added GetColor and GetText Lua bindings.
This commit is contained in:
@@ -8,6 +8,10 @@ ________________________________________________________________________________
|
|||||||
StepMania 5.0 $next | 2011????
|
StepMania 5.0 $next | 2011????
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
2011/09/25
|
||||||
|
----------
|
||||||
|
* [WheelItemBase] Added GetColor and GetText Lua bindings. [AJ]
|
||||||
|
|
||||||
2011/09/24
|
2011/09/24
|
||||||
----------
|
----------
|
||||||
* [ScreenEdit] Disable shifting timing changes down one beat if starting on
|
* [ScreenEdit] Disable shifting timing changes down one beat if starting on
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ WheelItemBaseData::WheelItemBaseData( WheelItemDataType type, RString sText, Rag
|
|||||||
m_color = color;
|
m_color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// begin WheelItemBase
|
||||||
WheelItemBase::WheelItemBase( const WheelItemBase &cpy ):
|
WheelItemBase::WheelItemBase( const WheelItemBase &cpy ):
|
||||||
ActorFrame( cpy ),
|
ActorFrame( cpy ),
|
||||||
m_pData( cpy.m_pData ),
|
m_pData( cpy.m_pData ),
|
||||||
@@ -63,6 +64,27 @@ void WheelItemBase::DrawPrimitives()
|
|||||||
DrawGrayBar( *m_pGrayBar );
|
DrawGrayBar( *m_pGrayBar );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// lua start
|
||||||
|
#include "LuaBinding.h"
|
||||||
|
|
||||||
|
/** @brief Allow Lua to have access to the WheelItemBase. */
|
||||||
|
class LunaWheelItemBase: public Luna<WheelItemBase>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DEFINE_METHOD( GetColor, GetColor() )
|
||||||
|
DEFINE_METHOD( GetText, GetText() )
|
||||||
|
//DEFINE_METHOD( GetType, GetType() )
|
||||||
|
|
||||||
|
LunaWheelItemBase()
|
||||||
|
{
|
||||||
|
ADD_METHOD( GetColor );
|
||||||
|
ADD_METHOD( GetText );
|
||||||
|
//ADD_METHOD( GetType );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
LUA_REGISTER_DERIVED_CLASS( WheelItemBase, ActorFrame )
|
||||||
|
// lua end
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2001-2004 Chris Danford, Chris Gomez, Glenn Maynard, Josh Allen
|
* (c) 2001-2004 Chris Danford, Chris Gomez, Glenn Maynard, Josh Allen
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|||||||
@@ -48,6 +48,13 @@ public:
|
|||||||
|
|
||||||
RageColor m_colorLocked;
|
RageColor m_colorLocked;
|
||||||
|
|
||||||
|
const RString GetText(){ return m_pData->m_sText; }
|
||||||
|
const RageColor GetColor(){ return m_pData->m_color; }
|
||||||
|
WheelItemDataType GetType(){ return m_pData->m_Type; }
|
||||||
|
|
||||||
|
// Lua
|
||||||
|
void PushSelf( lua_State *L );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void SetGrayBar( Actor *pBar ) { m_pGrayBar = pBar; }
|
void SetGrayBar( Actor *pBar ) { m_pGrayBar = pBar; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user