add input length cap

fix bogus s_bCancelled flag
This commit is contained in:
Chris Danford
2005-03-23 04:08:27 +00:00
parent ae57faa18d
commit ee4be22260
10 changed files with 106 additions and 51 deletions
+10 -3
View File
@@ -27,7 +27,14 @@ enum KeyboardRowSpecialKey
class ScreenTextEntry : public Screen
{
public:
ScreenTextEntry( CString sName, CString sQuestion, CString sInitialAnswer, void(*OnOK)(CString sAnswer) = NULL, void(*OnCanel)() = NULL, bool bPassword = false );
ScreenTextEntry(
CString sName,
CString sQuestion,
CString sInitialAnswer,
int iMaxInputLength,
void(*OnOK)(CString sAnswer) = NULL,
void(*OnCanel)() = NULL,
bool bPassword = false );
~ScreenTextEntry();
virtual void Init();
@@ -59,6 +66,7 @@ protected:
void UpdateAnswerText();
CString m_sQuestion;
int m_iMaxInputLength;
bool m_bPassword;
AutoActor m_Background;
BitmapText m_textQuestion;
@@ -67,8 +75,7 @@ protected:
BitmapText m_textAnswer;
void(*m_pOnOK)( CString sAnswer );
void(*m_pOnCancel)();
bool m_bCancelled;
AutoActor m_sprCursor;
int m_iFocusX;