From 53a4307c9d79ad1a33cbe8fea2281318338fc969 Mon Sep 17 00:00:00 2001 From: Josh Allen Date: Tue, 3 May 2005 21:49:51 +0000 Subject: [PATCH] Tell the constructor what type it is. --- stepmania/src/MusicWheelItem.cpp | 25 +++++++++++++------------ stepmania/src/MusicWheelItem.h | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/stepmania/src/MusicWheelItem.cpp b/stepmania/src/MusicWheelItem.cpp index e24d8afe83..95cecc0a9f 100644 --- a/stepmania/src/MusicWheelItem.cpp +++ b/stepmania/src/MusicWheelItem.cpp @@ -43,29 +43,30 @@ WheelItemData::WheelItemData( WheelItemType wit, Song* pSong, CString sSectionNa } -MusicWheelItem::MusicWheelItem() +MusicWheelItem::MusicWheelItem(CString sType) +:WheelItemBase( sType ) { data = NULL; - SetName( "MusicWheelItem" ); + SetName( sType ); - m_sprSongBar.Load( THEME->GetPathG("MusicWheelItem","song") ); + m_sprSongBar.Load( THEME->GetPathG(sType,"song") ); m_sprSongBar.SetXY( 0, 0 ); this->AddChild( &m_sprSongBar ); - m_sprSectionBar.Load( THEME->GetPathG("MusicWheelItem","section") ); + m_sprSectionBar.Load( THEME->GetPathG(sType,"section") ); m_sprSectionBar.SetXY( 0, 0 ); this->AddChild( &m_sprSectionBar ); - m_sprExpandedBar.Load( THEME->GetPathG("MusicWheelItem","expanded") ); + m_sprExpandedBar.Load( THEME->GetPathG(sType,"expanded") ); m_sprExpandedBar.SetXY( 0, 0 ); this->AddChild( &m_sprExpandedBar ); - m_sprModeBar.Load( THEME->GetPathG("MusicWheelItem","mode") ); + m_sprModeBar.Load( THEME->GetPathG(sType,"mode") ); m_sprModeBar.SetXY( 0, 0 ); this->AddChild( &m_sprModeBar ); - m_sprSortBar.Load( THEME->GetPathG("MusicWheelItem","sort") ); + m_sprSortBar.Load( THEME->GetPathG(sType,"sort") ); m_sprSortBar.SetXY( 0, 0 ); this->AddChild( &m_sprSortBar ); @@ -79,13 +80,13 @@ MusicWheelItem::MusicWheelItem() m_TextBanner.RunCommands( SONG_NAME_ON_COMMAND ); this->AddChild( &m_TextBanner ); - m_textSection.LoadFromFont( THEME->GetPathF("MusicWheelItem","section") ); + m_textSection.LoadFromFont( THEME->GetPathF(sType,"section") ); m_textSection.SetShadowLength( 0 ); m_textSection.SetXY( SECTION_X, SECTION_Y ); m_textSection.RunCommands( SECTION_ON_COMMAND ); this->AddChild( &m_textSection ); - m_textRoulette.LoadFromFont( THEME->GetPathF("MusicWheelItem","roulette") ); + m_textRoulette.LoadFromFont( THEME->GetPathF(sType,"roulette") ); m_textRoulette.SetShadowLength( 0 ); m_textRoulette.TurnRainbowOn(); m_textRoulette.SetXY( ROULETTE_X, ROULETTE_Y ); @@ -93,18 +94,18 @@ MusicWheelItem::MusicWheelItem() this->AddChild( &m_textRoulette ); m_textCourse.SetName( "CourseName" ); - m_textCourse.LoadFromFont( THEME->GetPathF("MusicWheelItem","course") ); + m_textCourse.LoadFromFont( THEME->GetPathF(sType,"course") ); SET_XY_AND_ON_COMMAND( &m_textCourse ); this->AddChild( &m_textCourse ); m_textSort.SetName( "Sort" ); - m_textSort.LoadFromFont( THEME->GetPathF("MusicWheelItem","sort") ); + m_textSort.LoadFromFont( THEME->GetPathF(sType,"sort") ); SET_XY_AND_ON_COMMAND( &m_textSort ); this->AddChild( &m_textSort ); FOREACH_PlayerNumber( p ) { - m_GradeDisplay[p].Load( THEME->GetPathG("MusicWheelItem","grades") ); + m_GradeDisplay[p].Load( THEME->GetPathG(sType,"grades") ); m_GradeDisplay[p].SetZoom( 1.0f ); m_GradeDisplay[p].SetXY( GRADE_X.GetValue(p), 0 ); this->AddChild( &m_GradeDisplay[p] ); diff --git a/stepmania/src/MusicWheelItem.h b/stepmania/src/MusicWheelItem.h index d06e3e18e5..59c03b2634 100644 --- a/stepmania/src/MusicWheelItem.h +++ b/stepmania/src/MusicWheelItem.h @@ -20,7 +20,7 @@ struct WheelItemData; class MusicWheelItem : public WheelItemBase { public: - MusicWheelItem(); + MusicWheelItem(CString sType = "MusicWheelItem"); virtual void LoadFromWheelItemData( WheelItemData* pWID, bool bExpanded ); void RefreshGrades();