fix hack regarding ModIcons and Lua option rows

Since the ModIcon is copied from the option row type, make sure we actually
copy everything it'll need, since Load() isn't called again.
This commit is contained in:
Devin J. Pohly
2013-08-29 14:36:57 -04:00
parent 9ec3b61bd1
commit 3233542309
+5 -3
View File
@@ -13,7 +13,10 @@ ModIcon::ModIcon( const ModIcon &cpy ):
ActorFrame(cpy),
m_text(cpy.m_text),
m_sprFilled(cpy.m_sprFilled),
m_sprEmpty(cpy.m_sprEmpty)
m_sprEmpty(cpy.m_sprEmpty),
m_vStopWords(cpy.m_vStopWords),
STOP_WORDS(cpy.STOP_WORDS),
CROP_TEXT_TO_WIDTH(cpy.CROP_TEXT_TO_WIDTH)
{
this->RemoveAllChildren();
this->AddChild( m_sprFilled );
@@ -63,8 +66,7 @@ void ModIcon::Set( const RString &_sText )
m_sprEmpty->SetVisible( bVacant );
m_text.SetText( sText );
// This line makes Lua option rows crash: -aj
//m_text.CropToWidth( CROP_TEXT_TO_WIDTH );
m_text.CropToWidth( CROP_TEXT_TO_WIDTH );
}
/*