bind UnloadTexture

This commit is contained in:
Glenn Maynard
2007-05-02 02:11:59 +00:00
parent 230d89eb5e
commit 25b7c141fb
+7
View File
@@ -962,9 +962,16 @@ class LunaSprite: public Luna<Sprite>
{ {
public: public:
static int Load( T* p, lua_State *L ) static int Load( T* p, lua_State *L )
{
if( lua_isnil(L, 1) )
{
p->UnloadTexture();
}
else
{ {
RageTextureID ID( SArg(1) ); RageTextureID ID( SArg(1) );
p->Load( ID ); p->Load( ID );
}
return 0; return 0;
} }
static int LoadBackground( T* p, lua_State *L ) static int LoadBackground( T* p, lua_State *L )