diff --git a/stepmania/src/WheelItemBase.cpp b/stepmania/src/WheelItemBase.cpp index e719c80752..6656b11a53 100644 --- a/stepmania/src/WheelItemBase.cpp +++ b/stepmania/src/WheelItemBase.cpp @@ -14,7 +14,8 @@ WheelItemBase::WheelItemBase( const WheelItemBase &cpy ): m_sprBar( cpy.m_sprBar ), m_text( cpy.m_text ), m_Type( cpy.m_Type ), - m_color( cpy.m_color ) + m_color( cpy.m_color ), + m_bExpanded( cpy.m_bExpanded ) { if( cpy.m_pBar == const_cast (&cpy.m_sprBar) ) m_pBar = &m_sprBar; @@ -28,6 +29,7 @@ WheelItemBase::WheelItemBase( const WheelItemBase &cpy ): WheelItemBase::WheelItemBase(RString sType) { + m_bExpanded = false; SetName( sType ); m_pBar = NULL; Load(sType); @@ -53,7 +55,7 @@ void WheelItemBase::Load( RString sType ) this->AddChild( &m_text ); } -void WheelItemBase::LoadFromWheelItemBaseData( WheelItemBaseData* pWID ) +void WheelItemBase::LoadFromWheelItemData( const WheelItemBaseData* pWID ) { ASSERT( pWID != NULL ); diff --git a/stepmania/src/WheelItemBase.h b/stepmania/src/WheelItemBase.h index 0fe8718a28..2187258577 100644 --- a/stepmania/src/WheelItemBase.h +++ b/stepmania/src/WheelItemBase.h @@ -29,18 +29,21 @@ public: WheelItemBase( RString sType = "WheelItemBase" ); WheelItemBase( const WheelItemBase &cpy ); virtual void DrawPrimitives(); + virtual Actor *Copy() const { return new WheelItemBase(*this); } void Load( RString sType ); void DrawGrayBar( Actor& bar ); + void SetExpanded( bool bExpanded ) { m_bExpanded = bExpanded; } - virtual void LoadFromWheelItemBaseData( WheelItemBaseData* pWID ); + virtual void LoadFromWheelItemData( const WheelItemBaseData* pWID ); RageColor m_colorLocked; protected: void SetGrayBar( Actor *pBar ) { m_pBar = pBar; } - WheelItemBaseData* data; + const WheelItemBaseData* data; + bool m_bExpanded; // if TYPE_SECTION, whether this section is expanded Actor *m_pBar; Sprite m_sprBar;