Add WheelItemData::HasBanner and WheelItemData::GetBanner.
This commit is contained in:
@@ -269,3 +269,43 @@ void MusicWheelItem::DrawPrimitives()
|
||||
bar->SetGlow( RageColor(0,0,0,0) );
|
||||
}
|
||||
}
|
||||
|
||||
bool WheelItemData::HasBanner() const
|
||||
{
|
||||
switch( m_Type )
|
||||
{
|
||||
case TYPE_SONG:
|
||||
return m_pSong->HasBanner();
|
||||
case TYPE_COURSE:
|
||||
return m_pCourse->HasBanner();
|
||||
case TYPE_SECTION:
|
||||
return SONGMAN->GetGroupBannerPath( m_sSectionName ).size() != 0;
|
||||
/* XXX: These are special cases. */
|
||||
case TYPE_ROULETTE:
|
||||
case TYPE_RANDOM:
|
||||
return false;
|
||||
|
||||
default: ASSERT(0); return false; // "";
|
||||
}
|
||||
}
|
||||
|
||||
CString WheelItemData::GetBanner() const
|
||||
{
|
||||
switch( m_Type )
|
||||
{
|
||||
case TYPE_SONG:
|
||||
return m_pSong->GetBannerPath();
|
||||
case TYPE_COURSE:
|
||||
return m_pCourse->m_sBannerPath;
|
||||
case TYPE_SECTION:
|
||||
return SONGMAN->GetGroupBannerPath( m_sSectionName );
|
||||
|
||||
case TYPE_ROULETTE:
|
||||
return THEME->GetPathToG("Banner random");
|
||||
|
||||
case TYPE_RANDOM:
|
||||
return THEME->GetPathToG("Banner roulette");
|
||||
|
||||
default: ASSERT(0); return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,9 @@ struct WheelItemData
|
||||
WheelItemData() {}
|
||||
WheelItemData( WheelItemType wit, Song* pSong, CString sSectionName, Course* pCourse, RageColor color );
|
||||
|
||||
bool HasBanner() const;
|
||||
CString GetBanner() const;
|
||||
|
||||
WheelItemType m_Type;
|
||||
CString m_sSectionName;
|
||||
Course* m_pCourse;
|
||||
|
||||
Reference in New Issue
Block a user