ScreenSetTime::ScreenSetTime( CString sClassName ) : ScreenWithMenuElements( sClassName )
{
	LOG->Trace( "ScreenSetTime::ScreenSetTime()" );
	
	m_Selection = hour;

	FOREACH_PlayerNumber( pn )
		GAMESTATE->m_bSideIsJoined[pn] = true;

	FOREACH_SetTimeSelection( s )
	{
		BitmapText &title = m_textTitle[s];
		BitmapText &value = m_textValue[s];

		title.LoadFromFont( THEME->GetPathToF("Common title") );
		title.SetDiffuse( RageColor(1,1,1,1) );
		title.SetText( SetTimeSelectionToString(s) );
		title.SetXY( GetTitleX(s), GetTitleY(s) );
		this->AddChild( &title );

		value.LoadFromFont( THEME->GetPathToF("Common normal") );
		value.SetDiffuse( RageColor(1,1,1,1) );
		value.SetXY( GetValueX(s), GetValueY(s) );
		this->AddChild( &value );
	}

	m_TimeOffset = 0;
	m_Selection = (SetTimeSelection)0;
	ChangeSelection( 0 );

	SOUND->PlayMusic( THEME->GetPathS(m_sName,"music") );

	this->SortByDrawOrder();
}
Esempio n. 2
0
void ScreenSetTime::Init()
{
	ScreenWithMenuElements::Init();

	m_Selection = hour;

	FOREACH_SetTimeSelection( s )
	{
		BitmapText &title = m_textTitle[s];
		BitmapText &value = m_textValue[s];

		title.LoadFromFont( THEME->GetPathF("Common","title") );
		title.SetDiffuse( RageColor(1,1,1,1) );
		title.SetText( SetTimeSelectionToString(s) );
		title.SetXY( GetTitleX(s), GetTitleY(s) );
		this->AddChild( &title );

		title.SetDiffuse( RageColor(1,1,1,0) );
		title.BeginTweening( 0.3f, TWEEN_LINEAR );
		title.SetDiffuse( RageColor(1,1,1,1) );

		value.LoadFromFont( THEME->GetPathF("Common","normal") );
		value.SetDiffuse( RageColor(1,1,1,1) );
		value.SetXY( GetValueX(s), GetValueY(s) );
		this->AddChild( &value );

		value.SetDiffuse( RageColor(1,1,1,0) );
		value.BeginTweening( 0.3f, TWEEN_LINEAR );
		value.SetDiffuse( RageColor(1,1,1,1) );
	}

	m_soundChangeSelection.Load( THEME->GetPathS("ScreenSetTime","ChangeSelection") );
	m_soundChangeValue.Load( THEME->GetPathS("ScreenSetTime","ChangeValue") );

	m_TimeOffset = 0;
	m_Selection = (SetTimeSelection)0;
	ChangeSelection( 0 );
}