Generic tween on/off.

This commit is contained in:
Steve Checkoway
2007-05-13 03:42:31 +00:00
parent e5c803d24c
commit 6a665f43fb
2 changed files with 8 additions and 21 deletions
+6 -19
View File
@@ -116,10 +116,12 @@ void ScreenTextEntry::Init()
m_textQuestion.LoadFromFont( THEME->GetPathF(m_sName,"question") );
m_textQuestion.SetName( "Question" );
LOAD_ALL_COMMANDS( m_textQuestion );
this->AddChild( &m_textQuestion );
m_textAnswer.LoadFromFont( THEME->GetPathF(m_sName,"answer") );
m_textAnswer.SetName( "Answer" );
LOAD_ALL_COMMANDS( m_textAnswer );
this->AddChild( &m_textAnswer );
m_bShowAnswerCaret = false;
@@ -135,8 +137,8 @@ void ScreenTextEntry::BeginScreen()
ScreenWithMenuElements::BeginScreen();
m_textQuestion.SetText( g_sQuestion );
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_textQuestion );
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_textAnswer );
SET_XY( m_textQuestion );
SET_XY( m_textAnswer );
UpdateAnswerText();
}
@@ -245,14 +247,6 @@ void ScreenTextEntry::MenuStart( const InputEventPlus &input )
End( false );
}
void ScreenTextEntry::TweenOffScreen()
{
ScreenWithMenuElements::TweenOffScreen();
OFF_COMMAND( m_textQuestion );
OFF_COMMAND( m_textAnswer );
}
void ScreenTextEntry::End( bool bCancelled )
{
if( bCancelled )
@@ -261,7 +255,7 @@ void ScreenTextEntry::End( bool bCancelled )
g_pOnCancel();
Cancel( SM_GoToNextScreen );
TweenOffScreen();
//TweenOffScreen();
}
else
{
@@ -309,6 +303,7 @@ void ScreenTextEntryVisual::Init()
m_sprCursor.Load( THEME->GetPathG(m_sName,"cursor") );
m_sprCursor->SetName( "Cursor" );
LOAD_ALL_COMMANDS( m_sprCursor );
this->AddChild( m_sprCursor );
// Init keyboard
@@ -349,7 +344,6 @@ void ScreenTextEntryVisual::BeginScreen()
{
ScreenTextEntry::BeginScreen();
ON_COMMAND( m_sprCursor );
m_iFocusX = 0;
m_iFocusY = (KeyboardRow)0;
@@ -461,13 +455,6 @@ void ScreenTextEntryVisual::MenuStart( const InputEventPlus &input )
}
}
void ScreenTextEntryVisual::TweenOffScreen()
{
ScreenTextEntry::TweenOffScreen();
OFF_COMMAND( m_sprCursor );
}
/*
* (c) 2001-2004 Chris Danford
* All rights reserved.
+2 -2
View File
@@ -65,7 +65,6 @@ public:
virtual void Update( float fDelta );
virtual void Input( const InputEventPlus &input );
virtual void TweenOffScreen();
static RString s_sLastAnswer;
static bool s_bCancelledLast;
@@ -76,6 +75,8 @@ protected:
virtual void TextEnteredDirectly() { }
virtual void End( bool bCancelled );
virtual bool GenericTweenOn() const { return true; }
virtual bool GenericTweenOff() const { return true; }
private:
virtual void MenuStart( const InputEventPlus &input );
@@ -101,7 +102,6 @@ public:
~ScreenTextEntryVisual();
void Init();
void BeginScreen();
virtual void TweenOffScreen();
protected:
void MoveX( int iDir );