From 251f1984412b8c00681a07f5c2aaf5b86790640d Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Sat, 12 Oct 2019 15:06:13 -0700 Subject: [PATCH] fix console for mode --- libs/core/input.ts | 1 + libs/ev3/console.ts | 1 + libs/screen/targetoverrides.ts | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/libs/core/input.ts b/libs/core/input.ts index d32d094e..72d2ec7d 100644 --- a/libs/core/input.ts +++ b/libs/core/input.ts @@ -911,3 +911,4 @@ void cUiUpdatePower(void) } } } +} \ No newline at end of file diff --git a/libs/ev3/console.ts b/libs/ev3/console.ts index 8c95a185..4e615381 100644 --- a/libs/ev3/console.ts +++ b/libs/ev3/console.ts @@ -21,6 +21,7 @@ namespace console._screen { console.addListener(log); brick.buttonUp.onEvent(ButtonEvent.Bumped, () => scroll(-3)) brick.buttonDown.onEvent(ButtonEvent.Bumped, () => scroll(3)) + brick.showConsole(); } } diff --git a/libs/screen/targetoverrides.ts b/libs/screen/targetoverrides.ts index c529e259..b4916145 100644 --- a/libs/screen/targetoverrides.ts +++ b/libs/screen/targetoverrides.ts @@ -27,6 +27,7 @@ namespace brick { ShowLines, Image, Ports, + Console, Custom } let screenMode = ScreenMode.None; @@ -197,6 +198,12 @@ namespace brick { }) } + export function showConsole() { + console.sendToScreen(); + screenMode = ScreenMode.Console; + clearScreen(); + } + /** * An image * @param image the image