add RageColor::FromStackCompat
This commit is contained in:
@@ -36,6 +36,21 @@ void RageColor::FromStack( lua_State *L, int iPos )
|
|||||||
lua_pop( L, 5 );
|
lua_pop( L, 5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RageColor::FromStackCompat( lua_State *L, int iPos )
|
||||||
|
{
|
||||||
|
if( lua_type(L, iPos) == LUA_TTABLE )
|
||||||
|
{
|
||||||
|
FromStack( L, iPos );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
r = FArg(iPos+0);
|
||||||
|
g = FArg(iPos+1);
|
||||||
|
b = FArg(iPos+2);
|
||||||
|
a = FArg(iPos+3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
namespace LuaHelpers
|
namespace LuaHelpers
|
||||||
{
|
{
|
||||||
template<> bool FromStack<RageColor>( lua_State *L, RageColor &Object, int iOffset )
|
template<> bool FromStack<RageColor>( lua_State *L, RageColor &Object, int iOffset )
|
||||||
|
|||||||
@@ -196,6 +196,7 @@ public:
|
|||||||
|
|
||||||
void PushTable( lua_State *L ) const;
|
void PushTable( lua_State *L ) const;
|
||||||
void FromStack( lua_State *L, int iPos );
|
void FromStack( lua_State *L, int iPos );
|
||||||
|
void FromStackCompat( lua_State *L, int iPos );
|
||||||
|
|
||||||
float r, g, b, a;
|
float r, g, b, a;
|
||||||
} SM_ALIGN(16);
|
} SM_ALIGN(16);
|
||||||
|
|||||||
Reference in New Issue
Block a user