chiark / gitweb /
Add print time and filament usage estimates.
[cura.git] / Cura / gui / util / opengl.py
index a3ed6bd2d3479394132a033fa94e9ec5e0bb1c2f..87845124cdc3b6fa65ce2d3c04be22460dfcfee9 100644 (file)
@@ -274,8 +274,16 @@ def glGetStringSize(s):
 
 def glDrawStringLeft(s):
        glRasterPos2f(0, 0)
+       n = 1
        for c in s:
-               glutBitmapCharacter(OpenGL.GLUT.GLUT_BITMAP_HELVETICA_18, ord(c))
+               if c == '\n':
+                       glPushMatrix()
+                       glTranslate(0, 18 * n, 0)
+                       n += 1
+                       glRasterPos2f(0, 0)
+                       glPopMatrix()
+               else:
+                       glutBitmapCharacter(OpenGL.GLUT.GLUT_BITMAP_HELVETICA_18, ord(c))
 
 def glDrawStringRight(s):
        glRasterPos2f(0, 0)