param, not global
This commit is contained in:
@@ -665,16 +665,11 @@ void OptionRow::Update( float fDeltaTime )
|
|||||||
void OptionRow::SetOptionIcon( PlayerNumber pn, const RString &sText, GameCommand &gc )
|
void OptionRow::SetOptionIcon( PlayerNumber pn, const RString &sText, GameCommand &gc )
|
||||||
{
|
{
|
||||||
// update bullet
|
// update bullet
|
||||||
Lua *L = LUA->Get();
|
Message msg( "Refresh" );
|
||||||
gc.PushSelf( L );
|
msg.SetParam( "GameCommand", gc );
|
||||||
lua_setglobal( L, "ThisGameCommand" );
|
m_sprBullet->HandleMessage( msg );
|
||||||
LUA->Release( L );
|
|
||||||
|
|
||||||
m_sprBullet->PlayCommand( "Refresh" );
|
|
||||||
if( m_OptionIcons[pn] != NULL )
|
if( m_OptionIcons[pn] != NULL )
|
||||||
m_OptionIcons[pn]->Set( pn, sText, false );
|
m_OptionIcons[pn]->Set( pn, sText, false );
|
||||||
|
|
||||||
LUA->UnsetGlobal( "ThisGameCommand" );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const BitmapText &OptionRow::GetTextItemForRow( PlayerNumber pn, int iChoiceOnRow ) const
|
const BitmapText &OptionRow::GetTextItemForRow( PlayerNumber pn, int iChoiceOnRow ) const
|
||||||
|
|||||||
Reference in New Issue
Block a user