Some more loops.
This commit is contained in:
+9
-10
@@ -232,16 +232,15 @@ void ScreenOptions::InitMenu( const vector<OptionRowHandler*> &vHands )
|
|||||||
|
|
||||||
m_frameContainer.SortByDrawOrder();
|
m_frameContainer.SortByDrawOrder();
|
||||||
|
|
||||||
FOREACH( OptionRow*, m_pRows, p )
|
int iIndex = 0;
|
||||||
|
for (OptionRow *p : m_pRows)
|
||||||
{
|
{
|
||||||
int iIndex = p - m_pRows.begin();
|
|
||||||
|
|
||||||
Lua *L = LUA->Get();
|
Lua *L = LUA->Get();
|
||||||
LuaHelpers::Push( L, iIndex );
|
LuaHelpers::Push( L, iIndex++ );
|
||||||
(*p)->m_pLuaInstance->Set( L, "iIndex" );
|
p->m_pLuaInstance->Set( L, "iIndex" );
|
||||||
LUA->Release( L );
|
LUA->Release( L );
|
||||||
|
|
||||||
(*p)->RunCommands( ROW_INIT_COMMAND );
|
p->RunCommands( ROW_INIT_COMMAND );
|
||||||
}
|
}
|
||||||
|
|
||||||
// poke once at all the explanation metrics so that we catch missing ones early
|
// poke once at all the explanation metrics so that we catch missing ones early
|
||||||
@@ -334,8 +333,8 @@ void ScreenOptions::TweenOnScreen()
|
|||||||
{
|
{
|
||||||
ScreenWithMenuElements::TweenOnScreen();
|
ScreenWithMenuElements::TweenOnScreen();
|
||||||
|
|
||||||
FOREACH( OptionRow*, m_pRows, p )
|
for (OptionRow *p : m_pRows)
|
||||||
(*p)->RunCommands( ROW_ON_COMMAND );
|
p->RunCommands( ROW_ON_COMMAND );
|
||||||
|
|
||||||
m_frameContainer.SortByDrawOrder();
|
m_frameContainer.SortByDrawOrder();
|
||||||
}
|
}
|
||||||
@@ -344,8 +343,8 @@ void ScreenOptions::TweenOffScreen()
|
|||||||
{
|
{
|
||||||
ScreenWithMenuElements::TweenOffScreen();
|
ScreenWithMenuElements::TweenOffScreen();
|
||||||
|
|
||||||
FOREACH( OptionRow*, m_pRows, p )
|
for (OptionRow *p : m_pRows)
|
||||||
(*p)->RunCommands( ROW_OFF_COMMAND );
|
p->RunCommands( ROW_OFF_COMMAND );
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenOptions::~ScreenOptions()
|
ScreenOptions::~ScreenOptions()
|
||||||
|
|||||||
Reference in New Issue
Block a user