Add cancel transition for STextEntry

Validate new edit name is unique
This commit is contained in:
Chris Danford
2005-03-23 05:12:31 +00:00
parent 4c3b100c16
commit 6adaa3f1a2
9 changed files with 86 additions and 41 deletions
+10 -1
View File
@@ -500,6 +500,7 @@ void ScreenManager::TextEntry(
CString sQuestion,
CString sInitialAnswer,
int iMaxInputLength,
bool(*Validate)(CString sAnswer,CString &sErrorOut),
void(*OnOK)(CString sAnswer),
void(*OnCancel)(),
bool bPassword
@@ -509,7 +510,15 @@ void ScreenManager::TextEntry(
m_ScreenStack.back()->HandleScreenMessage( SM_LoseFocus );
// add the new state onto the back of the array
Screen *pNewScreen = new ScreenTextEntry( "ScreenTextEntry", sQuestion, sInitialAnswer, iMaxInputLength, OnOK, OnCancel, bPassword );
Screen *pNewScreen = new ScreenTextEntry(
"ScreenTextEntry",
sQuestion,
sInitialAnswer,
iMaxInputLength,
Validate,
OnOK,
OnCancel,
bPassword );
pNewScreen->Init();
this->ZeroNextUpdate();
SetFromNewScreen( pNewScreen, true );