Combines locate fix, show/hide cursor + Justin Jordans additions
Fork of Terminal by
Diff: Terminal.cpp
- Revision:
- 9:45fba42a98aa
- Parent:
- 8:9ab22fc6e88b
diff -r 9ab22fc6e88b -r 45fba42a98aa Terminal.cpp --- a/Terminal.cpp Sat Mar 25 19:10:15 2017 +0000 +++ b/Terminal.cpp Thu Jul 06 13:17:38 2017 +0000 @@ -34,7 +34,7 @@ void Terminal::locate(int column, int row) { // Cursor Home <ESC>[{ROW};{COLUMN}H - this->printf("\033[%d;%dH%c", row + 1, column + 1); + this->printf("\033[%d;%dH", row + 1, column + 1); } static int rgb888tobgr111(int colour) { @@ -219,3 +219,13 @@ return(user_input); } + +void Terminal::hideCursor() { + //Hide cursor from terminal + this->printf("\033[?25l"); +} + +void Terminal::showCursor() { + //Hide cursor from terminal + this->printf("\33[[?25h"); +}