Ejemplo n.º 1
0
void ScreenPrompt::BeginScreen()
{
	ScreenWithMenuElements::BeginScreen();

	m_Answer = g_defaultAnswer;
	ENUM_CLAMP( m_Answer, PromptAnswer(0), PromptAnswer(g_PromptType) );

	m_textQuestion.SetText( g_sText );
	SET_XY( m_textQuestion );
	m_textQuestion.PlayCommand( "On" );

	m_sprCursor->PlayCommand( "On" );

	for( int i=0; i<=g_PromptType; i++ )
	{
		RString sElem = ssprintf("Answer%dOf%d", i+1, g_PromptType+1);
		m_textAnswer[i].SetName( sElem );
		RString sAnswer = PromptAnswerToString( (PromptAnswer)i );
		// FRAGILE
		if( g_PromptType == PROMPT_OK )
			sAnswer = "OK";
		
		m_textAnswer[i].SetText( ANSWER_TEXT(sAnswer) );
		m_textAnswer[i].PlayCommand( "On" );
		SET_XY( m_textAnswer[i] );
	}

	for( int i=g_PromptType+1; i<NUM_PromptAnswer; i++ )
		m_textAnswer[i].SetText( "" );

	PositionCursor();
}
Ejemplo n.º 2
0
void ScreenPrompt::BeginScreen()
{
	ScreenWithMenuElements::BeginScreen();

	m_Answer = g_defaultAnswer;
	ENUM_CLAMP( m_Answer, PromptAnswer(0), PromptAnswer(g_PromptType) );

	m_textQuestion.SetText( g_sText );
	SET_XY( m_textQuestion );
	m_textQuestion.PlayCommand( "On" );

	m_sprCursor->PlayCommand( "On" );

	for( int i=0; i<=g_PromptType; i++ )
	{
		RString sElem = ssprintf("Answer%dOf%d", i+1, g_PromptType+1);
		m_textAnswer[i].SetName( sElem );
		LOAD_ALL_COMMANDS(m_textAnswer[i]);
		// Side note:  Because LOAD_ALL_COMMANDS occurs here, InitCommand will
		// not be run for the actors.  People can just use OnCommand instead.
		RString sAnswer = PromptAnswerToString( (PromptAnswer)i );
		// FRAGILE
		if( g_PromptType == PROMPT_OK )
			sAnswer = "OK";
		
		m_textAnswer[i].SetText( ANSWER_TEXT(sAnswer) );
		m_textAnswer[i].PlayCommand( "On" );
		SET_XY( m_textAnswer[i] );
	}

	for( int i=g_PromptType+1; i<NUM_PromptAnswer; i++ )
		m_textAnswer[i].SetText( "" );

	PositionCursor();
}
Ejemplo n.º 3
0
void ScreenSetTime::ChangeSelection( int iDirection )
{
	SetTimeSelection OldSelection = m_Selection;
	enum_add<SetTimeSelection>( m_Selection, iDirection );

	ENUM_CLAMP( m_Selection, SetTimeSelection(0), SetTimeSelection(NUM_SetTimeSelection-1) );
	if( iDirection != 0 && m_Selection == OldSelection )
		return; 

	m_textValue[OldSelection].StopEffect();
	m_textValue[m_Selection].SetEffectDiffuseShift( 1.f,
		RageColor(0.3f,0.3f,0.3f,1), 
		RageColor(1,1,1,1) );

	if( iDirection != 0 )
		m_soundChangeSelection.Play();
}