derive from SMWE
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user