fix console for mode

This commit is contained in:
Peli de Halleux 2019-10-12 15:06:13 -07:00
parent fe39902d10
commit 251f198441
3 changed files with 9 additions and 0 deletions

View File

@ -911,3 +911,4 @@ void cUiUpdatePower(void)
} }
} }
} }
}

View File

@ -21,6 +21,7 @@ namespace console._screen {
console.addListener(log); console.addListener(log);
brick.buttonUp.onEvent(ButtonEvent.Bumped, () => scroll(-3)) brick.buttonUp.onEvent(ButtonEvent.Bumped, () => scroll(-3))
brick.buttonDown.onEvent(ButtonEvent.Bumped, () => scroll(3)) brick.buttonDown.onEvent(ButtonEvent.Bumped, () => scroll(3))
brick.showConsole();
} }
} }

View File

@ -27,6 +27,7 @@ namespace brick {
ShowLines, ShowLines,
Image, Image,
Ports, Ports,
Console,
Custom Custom
} }
let screenMode = ScreenMode.None; let screenMode = ScreenMode.None;
@ -197,6 +198,12 @@ namespace brick {
}) })
} }
export function showConsole() {
console.sendToScreen();
screenMode = ScreenMode.Console;
clearScreen();
}
/** /**
* An image * An image
* @param image the image * @param image the image