mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-22 23:30:37 +01:00
[escher] When using input view controller, init the text content to the
previous text edited Change-Id: Id201196f38e8f2b6cd909c7e52708f2e84ab8a47
This commit is contained in:
@@ -38,10 +38,14 @@ const char * InputViewController::textBody() {
|
||||
return m_textFieldController.textField()->text();
|
||||
}
|
||||
|
||||
void InputViewController::edit(Responder * caller, Ion::Events::Event event, void * context, Invocation::Action successAction, Invocation::Action failureAction) {
|
||||
void InputViewController::edit(Responder * caller, Ion::Events::Event event, void * context, const char * initialText, Invocation::Action successAction, Invocation::Action failureAction) {
|
||||
m_successAction = Invocation(successAction, context);
|
||||
m_failureAction = Invocation(failureAction, context);
|
||||
m_textFieldController.textField()->handleEvent(event);
|
||||
if (initialText != nullptr) {
|
||||
m_textFieldController.textField()->insertTextAtLocation(initialText, 0);
|
||||
m_textFieldController.textField()->setCursorLocation(strlen(initialText));
|
||||
}
|
||||
displayModalViewController(&m_textFieldController, 1.0f, 1.0f);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user