allow STextEntry to be used as a regular screen and not a pushed screen
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user