Added hide / show cursor mehodes
Fork of Terminal by
Revision 3:8fd40799c142, committed 2015-10-15
- Comitter:
- madmonkeyman82
- Date:
- Thu Oct 15 17:01:25 2015 +0000
- Parent:
- 2:85184c13476c
- Commit message:
- Added hide / show cursor methode to terminal lib.
Changed in this revision
Terminal.cpp | Show annotated file Show diff for this revision Revisions of this file |
Terminal.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/Terminal.cpp Tue Nov 23 16:03:35 2010 +0000 +++ b/Terminal.cpp Thu Oct 15 17:01:25 2015 +0000 @@ -55,3 +55,13 @@ int c = 40 + rgb888tobgr111(colour); this->printf("\033[%dm", c); } + +void Terminal::hideCursor() { + //Hide cursor from terminal + this->printf("\033[?25l"); +} + +void Terminal::showCursor() { + //Hide cursor from terminal + this->printf("\33[[?25h"); +} \ No newline at end of file
--- a/Terminal.h Tue Nov 23 16:03:35 2010 +0000 +++ b/Terminal.h Thu Oct 15 17:01:25 2015 +0000 @@ -70,6 +70,12 @@ /** Set the background colour */ void background(int colour); + + /** Hide Cursor from terminal*/ + void hideCursor(); + + /** Hide Cursor from terminal*/ + void showCursor(); }; #endif