allow STextEntry to be used as a regular screen and not a pushed screen

This commit is contained in:
Chris Danford
2006-04-28 01:35:03 +00:00
parent 6e7a651f00
commit 78b8cad05d
2 changed files with 27 additions and 0 deletions
+19
View File
@@ -38,6 +38,25 @@ namespace
bool g_bPassword; bool g_bPassword;
}; };
void ScreenTextEntry::SetTextEntrySettings(
RString sQuestion,
RString sInitialAnswer,
int iMaxInputLength,
bool(*Validate)(const RString &sAnswer,RString &sErrorOut),
void(*OnOK)(const RString &sAnswer),
void(*OnCancel)(),
bool bPassword
)
{
g_sQuestion = sQuestion;
g_sInitialAnswer = sInitialAnswer;
g_iMaxInputLength = iMaxInputLength;
g_pValidate = Validate;
g_pOnOK = OnOK;
g_pOnCancel = OnCancel;
g_bPassword = bPassword;
}
void ScreenTextEntry::TextEntry( void ScreenTextEntry::TextEntry(
ScreenMessage smSendOnPop, ScreenMessage smSendOnPop,
RString sQuestion, RString sQuestion,
+8
View File
@@ -24,6 +24,14 @@ enum KeyboardRowSpecialKey
class ScreenTextEntry : public ScreenWithMenuElements class ScreenTextEntry : public ScreenWithMenuElements
{ {
public: public:
static void SetTextEntrySettings(
RString sQuestion,
RString sInitialAnswer,
int iMaxInputLength,
bool(*Validate)(const RString &sAnswer,RString &sErrorOut) = NULL,
void(*OnOK)(const RString &sAnswer) = NULL,
void(*OnCanel)() = NULL,
bool bPassword = false );
static void TextEntry( static void TextEntry(
ScreenMessage smSendOnPop, ScreenMessage smSendOnPop,
RString sQuestion, RString sQuestion,