Set ItemIndex for each item in an ActorScroller, so commands

can use it.
This commit is contained in:
Glenn Maynard
2005-12-08 19:38:44 +00:00
parent 38ffd83205
commit 84ab38abec
2 changed files with 17 additions and 0 deletions
+8
View File
@@ -4,6 +4,7 @@
#include "LuaManager.h"
#include "ActorUtil.h"
#include "RageUtil.h"
#include "LuaBinding.h"
Actor *DynamicActorScroller::Copy() const { return new DynamicActorScroller(*this); }
@@ -98,6 +99,13 @@ void DynamicActorScroller::ShiftSubActors( int iDist )
else if( iIndex < 0 || iIndex >= m_iNumItems || iItem < 0 || iItem >= m_iNumItems )
continue;
{
Lua *L = LUA->Get();
lua_pushnumber( L, i );
m_SubActors[iIndex]->m_pLuaInstance->Set( L, "ItemIndex" );
LUA->Release(L);
}
ConfigureActor( m_SubActors[iIndex], iItem );
}
}