copy ctor

This commit is contained in:
Glenn Maynard
2005-07-16 02:52:16 +00:00
parent b925b2d7ca
commit 99d4f12881
2 changed files with 11 additions and 2 deletions
+10 -2
View File
@@ -17,10 +17,18 @@ OptionIcon::OptionIcon()
{
}
OptionIcon::OptionIcon( const OptionIcon &cpy ):
ActorFrame(cpy),
m_text(cpy.m_text),
m_spr(cpy.m_spr)
{
this->RemoveAllChildren();
this->AddChild( &m_spr );
this->AddChild( &m_text );
}
void OptionIcon::Load( CString sType )
{
ASSERT( m_SubActors.empty() ); // don't load twice
m_spr.Load( THEME->GetPathG(sType,"icon 3x2") );
m_spr.StopAnimating();
this->AddChild( &m_spr );
+1
View File
@@ -13,6 +13,7 @@ class OptionIcon : public ActorFrame
{
public:
OptionIcon();
OptionIcon( const OptionIcon &cpy );
void Load( CString sType );
void Set( PlayerNumber pn, const CString &sText, bool bHeader = false );