Generic tween on/off.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user