update for changes to blf module
authorCampbell Barton <ideasman42@gmail.com>
Tue, 27 Apr 2010 19:46:15 +0000 (19:46 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 27 Apr 2010 19:46:15 +0000 (19:46 +0000)
release/scripts/templates/operator_modal_draw.py

index 3c7c4409f50361f143b7d5d2fc4d680bdca0c561..98efa38e9eed0e00d8daaa772e8364381ead762b 100644 (file)
@@ -4,10 +4,12 @@ import blf
 def draw_callback_px(self, context):
     print("mouse points", len(self.mouse_path))
 
+    font_id = 0 # XXX, need to find out how best to get this.
+
     # draw some text
-    blf.position(15, 30, 0)
-    blf.size(20, 72)
-    blf.draw("Hello Word " + str(len(self.mouse_path)))
+    blf.position(font_id, 15, 30, 0)
+    blf.size(font_id, 20, 72)
+    blf.draw(font_id, "Hello Word " + str(len(self.mouse_path)))
 
     # 50% alpha, 2 pixel width line
     bgl.glEnable(bgl.GL_BLEND)