本文整理汇总了C++中Course::GetFullDisplayTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ Course::GetFullDisplayTitle方法的具体用法?C++ Course::GetFullDisplayTitle怎么用?C++ Course::GetFullDisplayTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Course
的用法示例。
在下文中一共展示了Course::GetFullDisplayTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ScreenAttract
//.........这里部分代码省略.........
for(i = 1; i <= NumUnlocks; i++)
{
CString DisplayedSong = DISPLAYED_SONG(i);
if (USE_UNLOCKS_DAT == 1)
if ((unsigned)i <= UNLOCKMAN->m_SongEntries.size() )
DisplayedSong = UNLOCKMAN->m_SongEntries[i-1].m_sSongName;
DisplayedSong.MakeUpper();
const UnlockEntry *pSong = UNLOCKMAN->FindLockEntry(DisplayedSong);
if ( pSong == NULL ) // no such song
continue;
BitmapText* text = new BitmapText;
text->LoadFromFont( THEME->GetPathToF("ScreenUnlock text") );
text->SetHorizAlign( Actor::align_left );
text->SetZoom(ScrollingTextZoom);
if (pSong && pSong->m_pSong != NULL)
{
CString title = pSong->m_pSong->GetDisplayMainTitle();
CString subtitle = pSong->m_pSong->GetDisplaySubTitle();
if( subtitle != "" )
title = title + "\n" + subtitle;
text->SetMaxWidth( MaxWidth );
text->SetText( title );
}
else // song is missing, might be a course
{
Course *crs = SONGMAN->FindCourse( DisplayedSong );
if (crs != NULL)
{
text->SetMaxWidth( MaxWidth );
text->SetText( crs->GetFullDisplayTitle() );
text->Command("Diffuse,0,1,0,1");
}
else // entry isn't a song or course
{
text->SetText( "" );
text->Command("Diffuse,0.5,0,0,1");
}
}
if (pSong != NULL && pSong->m_pSong != NULL)
{
if( pSong->IsLocked() ) // song is locked
{
text->SetText("???");
text->SetZoomX(1);
} else { // song is unlocked, change color
RageColor color = SONGMAN->GetGroupColor(pSong->m_pSong->m_sGroupName);
text->SetGlobalDiffuseColor(color);
}
}
text->SetXY(ScrollingTextX, ScrollingTextStartY);
if (UNLOCK_TEXT_SCROLL == 3 && UNLOCK_TEXT_SCROLL_ROWS + i > NumUnlocks)
{ // special command for last unlocks when extreme-style scrolling is in effect
float TargetRow = -0.5f + i + UNLOCK_TEXT_SCROLL_ROWS - NumUnlocks;
float StopOffPoint = ScrollingTextEndY - TargetRow / UNLOCK_TEXT_SCROLL_ROWS * (ScrollingTextEndY - ScrollingTextStartY);
float FirstCycleTime = (UNLOCK_TEXT_SCROLL_ROWS - TargetRow) * SECS_PER_CYCLE;
float SecondCycleTime = (6 + TargetRow) * SECS_PER_CYCLE - FirstCycleTime;
LOG->Trace("Target Row: %f", TargetRow);
LOG->Trace("command for icon %d: %s", i, ssprintf("diffusealpha,0;sleep,%f;diffusealpha,1;linear,%f;y,%f;linear,%f;y,%f;linear,0.1;diffusealpha,0", SECS_PER_CYCLE * (i - 1), FirstCycleTime, StopOffPoint, SecondCycleTime * 2, ScrollingTextEndY).c_str() );
text->Command( ssprintf("diffusealpha,0;sleep,%f;diffusealpha,1;linear,%f;y,%f;linear,%f;y,%f;linear,0.1;diffusealpha,0", SECS_PER_CYCLE * (i - 1), FirstCycleTime, StopOffPoint, SecondCycleTime, ScrollingTextEndY) );
示例2: OnRowValueChanged
void EditCoursesMenu::OnRowValueChanged( Row row )
{
LOG->Trace( "EditCoursesMenu::OnRowValueChanged(%i)", row );
const bool bCanGoLeft = CanGoLeft(), bCanGoRight = CanGoRight();
m_sprArrows[0].SetDiffuse( bCanGoLeft?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
m_sprArrows[1].SetDiffuse( bCanGoRight?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
m_sprArrows[0].EnableAnimation( bCanGoLeft );
m_sprArrows[1].EnableAnimation( bCanGoRight );
Course* pCourse = GetSelectedCourse();
CourseEntry* pEntry = GetSelectedEntry();
switch( row )
{
case ROW_COURSE:
CHECKPOINT;
m_textValue[ROW_COURSE].SetText( pCourse->GetFullDisplayTitle() );
m_CourseBanner.LoadFromCourse( pCourse );
m_CourseBanner.ScaleToClipped( COURSE_BANNER_WIDTH, COURSE_BANNER_HEIGHT );
m_iSelection[ROW_ENTRY] = 0;
pEntry = GetSelectedEntry();
if( pEntry == NULL )
{
CourseEntry ce;
const vector<Song*> &apSongs = SONGMAN->GetAllSongs();
ASSERT( !apSongs.empty() );
ce.pSong = apSongs[0];
pCourse->m_entries.push_back( ce );
pEntry = GetSelectedEntry();
}
// fall through
case ROW_COURSE_OPTIONS:
CHECKPOINT;
m_textValue[ROW_COURSE_OPTIONS].SetText(
ssprintf(
"(START) %s, %s, ",
pCourse->m_bRepeat ? "repeat" : "no repeat",
pCourse->m_bRandomize ? "randomize" : "no randomize" ) +
ssprintf(
(pCourse->m_iLives==-1) ? "use bar life" : "%d lives",
pCourse->m_iLives ) );
// fall through
case ROW_ACTION:
CHECKPOINT;
m_textValue[ROW_ACTION].SetText( "(START) " + ActionToString(GetSelectedAction()) );
// fall through
case ROW_ENTRY:
CHECKPOINT;
m_textValue[ROW_ENTRY].SetText( ssprintf("%d of %d",m_iSelection[ROW_ENTRY]+1, (int)GetSelectedCourse()->m_entries.size()) );
m_iSelection[ROW_ENTRY_TYPE] = pEntry->type;
// fall through
case ROW_ENTRY_TYPE:
CHECKPOINT;
m_textValue[ROW_ENTRY_TYPE].SetText( pEntry ? CourseEntryTypeToString(pEntry->type) : CString("(none)") );
// fall through
case ROW_ENTRY_OPTIONS:
CHECKPOINT;
{
CStringArray as;
const bool *bShow = g_bRowEnabledForType[GetSelectedEntry()->type];
if( bShow[song] )
as.push_back( pEntry->pSong ? pEntry->pSong->GetFullTranslitTitle() : CString("(missing song)") );
if( bShow[group] )
as.push_back( pEntry->group_name.empty() ? CString("(no group)") : pEntry->group_name );
if( bShow[difficulty] )
if( pEntry->difficulty != DIFFICULTY_INVALID )
as.push_back( DifficultyToString(pEntry->difficulty) );
if( bShow[low_meter] )
if( pEntry->low_meter > 0 )
as.push_back( ssprintf("low meter %d", pEntry->low_meter) );
if( bShow[high_meter] )
if( pEntry->high_meter > 0 )
as.push_back( ssprintf("high meter %d", pEntry->high_meter) );
if( bShow[best_worst_value] )
if( pEntry->players_index != -1 )
as.push_back( ssprintf("rank %d", pEntry->players_index+1) );
m_textValue[ROW_ENTRY_OPTIONS].SetText( "(START) " + join(", ",as) );
}
// fall through
case ROW_ENTRY_PLAYER_OPTIONS:
CHECKPOINT;
{
CString s = "(START) ";
PlayerOptions po;
po.FromString( pEntry->modifiers );
if( po.GetString().empty() )
s += "(none)";
else
s += po.GetString();
m_textValue[ROW_ENTRY_PLAYER_OPTIONS].SetText( s );
}
// fall through
case ROW_ENTRY_SONG_OPTIONS:
CHECKPOINT;
{
//.........这里部分代码省略.........