Houston Hoffman / Adafruit_GFX

Fork of Adafruit_GFX by Neal Horman

Revision:
17:005fab139cc2
Parent:
14:edb3c36aa1a7
Child:
18:de8c0b7e17c4
--- a/Adafruit_GFX.cpp	Tue Nov 11 22:08:20 2014 +0000
+++ b/Adafruit_GFX.cpp	Sun Jan 22 16:38:55 2017 +0000
@@ -378,8 +378,12 @@
         cursor_x += textsize*6;
         if (wrap && (cursor_x > (_width - textsize*6)))
         {
-            cursor_y += textsize*8;
             cursor_x = 0;
+            if (screen_wrap && (cursor_y > _height - textsize*14)) {
+                scroll();
+            } else {
+                cursor_y += textsize*8;
+            }
         }
     }
     return 1;
@@ -452,3 +456,4 @@
             break;
     }
 }
+