From eb9aade28d05367c761292e07c12969998287b30 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 27 May 2007 19:01:15 +0000 Subject: [PATCH] param, not global --- stepmania/src/OptionRow.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/stepmania/src/OptionRow.cpp b/stepmania/src/OptionRow.cpp index e624ff7788..3961957058 100644 --- a/stepmania/src/OptionRow.cpp +++ b/stepmania/src/OptionRow.cpp @@ -665,16 +665,11 @@ void OptionRow::Update( float fDeltaTime ) void OptionRow::SetOptionIcon( PlayerNumber pn, const RString &sText, GameCommand &gc ) { // update bullet - Lua *L = LUA->Get(); - gc.PushSelf( L ); - lua_setglobal( L, "ThisGameCommand" ); - LUA->Release( L ); - - m_sprBullet->PlayCommand( "Refresh" ); + Message msg( "Refresh" ); + msg.SetParam( "GameCommand", gc ); + m_sprBullet->HandleMessage( msg ); if( m_OptionIcons[pn] != NULL ) m_OptionIcons[pn]->Set( pn, sText, false ); - - LUA->UnsetGlobal( "ThisGameCommand" ); } const BitmapText &OptionRow::GetTextItemForRow( PlayerNumber pn, int iChoiceOnRow ) const