Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-11 09:35:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-11 09:35:45 +0300
commit80a650dfb1e73363ae6924dc5738b732bb89ded4 (patch)
tree7d8af50bde3e4c32474d899a7fd00558afe9befc /source/blender/editors/interface/view2d.c
parent59cfe81085b06243220cdb075a28a1352edebf7b (diff)
BLF_draw functions take an extra length argument, so the console drawing doenst need to swap in NULL chars to draw word wrapping.
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index c1c10bf33c6..43d4e20b8bb 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -1525,7 +1525,7 @@ static void scroll_printstr(Scene *scene, float x, float y, float val, int power
}
/* draw it */
- BLF_draw_default(x, y, 0.0f, str);
+ BLF_draw_default(x, y, 0.0f, str, sizeof(str)-1);
}
/* Draw scrollbars in the given 2d-region */
@@ -2054,7 +2054,7 @@ void UI_view2d_text_cache_draw(ARegion *ar)
for(v2s= strings.first; v2s; v2s= v2s->next) {
glColor3fv(v2s->col);
if(v2s->rect.xmin==v2s->rect.xmax)
- BLF_draw_default((float)v2s->mval[0], (float)v2s->mval[1], 0.0, v2s->str);
+ BLF_draw_default((float)v2s->mval[0], (float)v2s->mval[1], 0.0, v2s->str, sizeof(v2s->str)-1);
else {
int xofs=0, yofs;
@@ -2063,7 +2063,7 @@ void UI_view2d_text_cache_draw(ARegion *ar)
BLF_clipping_default(v2s->rect.xmin-4, v2s->rect.ymin-4, v2s->rect.xmax+4, v2s->rect.ymax+4);
BLF_enable_default(BLF_CLIPPING);
- BLF_draw_default(v2s->rect.xmin+xofs, v2s->rect.ymin+yofs, 0.0f, v2s->str);
+ BLF_draw_default(v2s->rect.xmin+xofs, v2s->rect.ymin+yofs, 0.0f, v2s->str, sizeof(v2s->str)-1);
BLF_disable_default(BLF_CLIPPING);
}
}