Based on Terminal lib from Simon Ford, some adds

Fork of TerminalPlus by Max Scordamaglia

Files at this revision

API Documentation at this revision

Comitter:
MaxScorda
Date:
Sun Dec 27 23:15:31 2015 +0000
Parent:
13:09eb30497e78
Commit message:
functions adds

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
diff -r 09eb30497e78 -r 3da6173413b7 Terminal.cpp
--- a/Terminal.cpp	Fri Nov 06 22:30:56 2015 +0000
+++ b/Terminal.cpp	Sun Dec 27 23:15:31 2015 +0000
@@ -120,6 +120,15 @@
     this->printf("\033[2K");
 }
 
+void Terminal::erasesquare(int x1, int y1, int x2, int y2)
+{
+   // cancella un quadrato dello schermo
+   for(int i=y1; i<y2; i++) {
+    //formatPrintf("*",x1,i,x2-x1);
+    formatPrintf(string2char(padstr(" ",x2-x1,' ')),x1,i);
+    }
+    
+}
 void Terminal::resetattrib()
 {
     // reset attrib
diff -r 09eb30497e78 -r 3da6173413b7 Terminal.h
--- a/Terminal.h	Fri Nov 06 22:30:56 2015 +0000
+++ b/Terminal.h	Sun Dec 27 23:15:31 2015 +0000
@@ -74,8 +74,11 @@
 
     /** Erase line */
     void eraseline();
+    
+    /** Erase square */
+    void erasesquare(int x1, int y1, int x2, int y2);
 
-// font attrib
+    // font attrib
     //** Reset attrib */
     void resetattrib();
     //** font bold */