Use Init() for all screens, so we can set state before the base class
members are loaded--they'll see resets, score finalization, etc. It also results in smaller code, due to a g++ bug that causes constructors to be emitted several times.
This commit is contained in:
@@ -14,6 +14,7 @@ class ScreenTextEntry : public Screen
|
||||
{
|
||||
public:
|
||||
ScreenTextEntry( CString sName, CString sQuestion, CString sInitialAnswer, void(*OnOK)(CString sAnswer) = NULL, void(*OnCanel)() = NULL, bool bPassword = false );
|
||||
virtual void Init();
|
||||
|
||||
virtual void Update( float fDeltaTime );
|
||||
virtual void DrawPrimitives();
|
||||
@@ -31,6 +32,7 @@ protected:
|
||||
|
||||
void UpdateText();
|
||||
|
||||
CString m_sQuestion;
|
||||
bool m_bPassword;
|
||||
BGAnimation m_Background;
|
||||
BitmapText m_textQuestion;
|
||||
|
||||
Reference in New Issue
Block a user