Set ItemIndex for each item in an ActorScroller, so commands
can use it.
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user