[escher] XNT button is now cyclic

This commit is contained in:
Laury
2022-07-06 22:52:49 +02:00
parent 77167d1706
commit 51a5f699c3
30 changed files with 167 additions and 48 deletions

View File

@@ -129,9 +129,10 @@ VariableBoxController * App::variableBoxForInputEventHandler(InputEventHandler *
}
bool App::textInputDidReceiveEvent(InputEventHandler * textInput, Ion::Events::Event event) {
const char * pythonText = Helpers::PythonTextForEvent(event);
if (pythonText != nullptr) {
textInput->handleEventWithText(pythonText);
bool shouldRemoveLastCharacter = false;
char buffer[CodePoint::MaxCodePointCharLength + 1];
if (Helpers::PythonTextForEvent(event, buffer, &shouldRemoveLastCharacter)) {
textInput->handleEventWithText(buffer, false, false, shouldRemoveLastCharacter);
return true;
}
return false;