[apps] Switch to mode editing when clicking on toolbox or variable box

Change-Id: Iff6a00234ac95c6519fba8046149d2f645f8ca86
This commit is contained in:
Émilie Feral
2017-02-07 17:27:55 +01:00
parent 24fc727b53
commit 9d6a945fbe
5 changed files with 11 additions and 4 deletions

View File

@@ -41,12 +41,12 @@ const char * InputViewController::textBody() {
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);
displayModalViewController(&m_textFieldController, 1.0f, 1.0f);
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);
}
bool InputViewController::textFieldDidFinishEditing(TextField * textField, const char * text) {