本文整理汇总了C++中BitmapText::TurnRainbowOff方法的典型用法代码示例。如果您正苦于以下问题:C++ BitmapText::TurnRainbowOff方法的具体用法?C++ BitmapText::TurnRainbowOff怎么用?C++ BitmapText::TurnRainbowOff使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BitmapText
的用法示例。
在下文中一共展示了BitmapText::TurnRainbowOff方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadFromWheelItemData
void MusicWheelItem::LoadFromWheelItemData( WheelItemData* pWID )
{
ASSERT( pWID != NULL );
data = pWID;
/*
// copy all data items
this->m_Type = pWID->m_Type;
this->m_sSectionName = pWID->m_sSectionName;
this->m_pCourse = pWID->m_pCourse;
this->m_pSong = pWID->m_pSong;
this->m_color = pWID->m_color;
this->m_Type = pWID->m_Type; */
// init type specific stuff
switch( pWID->m_Type )
{
case TYPE_SECTION:
case TYPE_COURSE:
case TYPE_SORT:
{
CString sDisplayName, sTranslitName;
BitmapText *bt = NULL;
switch( pWID->m_Type )
{
case TYPE_SECTION:
sDisplayName = SONGMAN->ShortenGroupName(data->m_sSectionName);
bt = &m_textSectionName;
break;
case TYPE_COURSE:
sDisplayName = data->m_pCourse->GetFullDisplayTitle();
sTranslitName = data->m_pCourse->GetFullTranslitTitle();
bt = &m_textCourse;
break;
case TYPE_SORT:
sDisplayName = data->m_sLabel;
bt = &m_textSort;
break;
default:
ASSERT(0);
}
bt->SetZoom( 1 );
bt->SetText( sDisplayName, sTranslitName );
bt->SetDiffuse( data->m_color );
bt->TurnRainbowOff();
const float fSourcePixelWidth = (float)bt->GetUnzoomedWidth();
const float fMaxTextWidth = 200;
if( fSourcePixelWidth > fMaxTextWidth )
bt->SetZoomX( fMaxTextWidth / fSourcePixelWidth );
}
break;
case TYPE_SONG:
{
m_TextBanner.LoadFromSong( data->m_pSong );
m_TextBanner.SetDiffuse( data->m_color );
m_WheelNotifyIcon.SetFlags( data->m_Flags );
RefreshGrades();
}
break;
case TYPE_ROULETTE:
m_textRoulette.SetText( THEME->GetMetric("MusicWheel","Roulette") );
break;
case TYPE_RANDOM:
m_textRoulette.SetText( THEME->GetMetric("MusicWheel","Random") );
break;
case TYPE_PORTAL:
m_textRoulette.SetText( THEME->GetMetric("MusicWheel","Portal") );
break;
default:
ASSERT( 0 ); // invalid type
}
}