Exemplo 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();
}
Exemplo 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();
}
Exemplo n.º 3
0
void ScreenPrompt::Change( int dir )
{
	m_textAnswer[m_Answer].StopEffect();
	m_Answer = (PromptAnswer)(m_Answer+dir);
	ASSERT( m_Answer >= 0  &&  m_Answer < NUM_PromptAnswer );  

	PositionCursor();

	m_sndChange.Play();
}