From 93ae621c5815648f4d6a132539cf494ce8d6a183 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 15 Jul 2005 01:51:32 +0000 Subject: [PATCH] derive from SMWE --- stepmania/src/ScreenTextEntry.cpp | 22 +++------------------- stepmania/src/ScreenTextEntry.h | 9 ++------- 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/stepmania/src/ScreenTextEntry.cpp b/stepmania/src/ScreenTextEntry.cpp index a056deb5b8..bce950f217 100644 --- a/stepmania/src/ScreenTextEntry.cpp +++ b/stepmania/src/ScreenTextEntry.cpp @@ -86,7 +86,7 @@ ScreenTextEntry::ScreenTextEntry( void(*OnOK)(const CString &sAnswer), void(*OnCancel)(), bool bPassword ) : - Screen( sClassName ) + ScreenWithMenuElements( sClassName ) { m_bIsTransparent = true; // draw screens below us @@ -102,10 +102,7 @@ ScreenTextEntry::ScreenTextEntry( void ScreenTextEntry::Init() { - m_Background.Load( THEME->GetPathB(m_sName,"background") ); - m_Background->SetDrawOrder( DRAW_ORDER_BEFORE_EVERYTHING ); - this->AddChild( m_Background ); - m_Background->PlayCommand( "On" ); + ScreenWithMenuElements::Init(); m_textQuestion.LoadFromFont( THEME->GetPathF(m_sName,"question") ); m_textQuestion.SetName( "Question" ); @@ -150,17 +147,6 @@ void ScreenTextEntry::Init() PositionCursor(); - m_In.Load( THEME->GetPathB(m_sName,"in") ); - m_In.StartTransitioning(); - this->AddChild( &m_In ); - - m_Out.Load( THEME->GetPathB(m_sName,"out") ); - this->AddChild( &m_Out ); - - m_Cancel.Load( THEME->GetPathB(m_sName,"cancel") ); - this->AddChild( &m_Cancel ); - - m_sndType.Load( THEME->GetPathS(m_sName,"type"), true ); m_sndBackspace.Load( THEME->GetPathS(m_sName,"backspace"), true ); m_sndChange.Load( THEME->GetPathS(m_sName,"change"), true ); @@ -264,7 +250,7 @@ void ScreenTextEntry::Input( const DeviceInput& DeviceI, const InputEventType ty } } - Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); + ScreenWithMenuElements::Input( DeviceI, type, GameI, MenuI, StyleI ); } void ScreenTextEntry::HandleScreenMessage( const ScreenMessage SM ) @@ -420,8 +406,6 @@ void ScreenTextEntry::End( bool bCancelled ) SCREENMAN->PlayStartSound(); } - m_Background->PlayCommand("Off"); - OFF_COMMAND( m_textQuestion ); OFF_COMMAND( m_sprAnswerBox ); OFF_COMMAND( m_textAnswer ); diff --git a/stepmania/src/ScreenTextEntry.h b/stepmania/src/ScreenTextEntry.h index 2b27ab29d1..9a41822a73 100644 --- a/stepmania/src/ScreenTextEntry.h +++ b/stepmania/src/ScreenTextEntry.h @@ -3,7 +3,7 @@ #ifndef SCREEN_TEXT_ENTRY_H #define SCREEN_TEXT_ENTRY_H -#include "Screen.h" +#include "ScreenWithMenuElements.h" #include "BitmapText.h" #include "Transition.h" #include "Quad.h" @@ -24,7 +24,7 @@ enum KeyboardRowSpecialKey SPACEBAR=2, BACKSPACE=5, CANCEL=8, DONE=11 }; -class ScreenTextEntry : public Screen +class ScreenTextEntry : public ScreenWithMenuElements { public: static void TextEntry( @@ -87,7 +87,6 @@ protected: CString m_sQuestion; int m_iMaxInputLength; bool m_bPassword; - AutoActor m_Background; BitmapText m_textQuestion; AutoActor m_sprAnswerBox; wstring m_sAnswer; @@ -105,10 +104,6 @@ protected: BitmapText m_textKeyboardChars[NUM_KEYBOARD_ROWS][KEYS_PER_ROW]; - Transition m_In; - Transition m_Out; - Transition m_Cancel; - RageSound m_sndType; RageSound m_sndBackspace; RageSound m_sndChange;