[python] A module can now ask to present a view controller

This commit is contained in:
Romain Goyet
2020-03-10 20:54:14 -04:00
committed by Émilie Feral
parent bd0b9f8a4a
commit 131df18b00
3 changed files with 8 additions and 0 deletions

View File

@@ -183,6 +183,11 @@ const char * ConsoleController::inputText(const char * prompt) {
return text;
}
void ConsoleController::displayViewController(ViewController * controller) {
stackViewController()->push(controller);
Container::activeApp()->setFirstResponder(controller); // FIXME: Shouldn't this be in Escher?
}
void ConsoleController::viewWillAppear() {
ViewController::viewWillAppear();
loadPythonEnvironment();