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/space_text
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/space_text')
-rw-r--r--source/blender/editors/space_text/text_draw.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 024eef9092a..ee00ffa9f87 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -74,20 +74,18 @@ static void text_font_end(SpaceText *UNUSED(st))
static int text_font_draw(SpaceText *UNUSED(st), int x, int y, char *str)
{
BLF_position(mono, x, y, 0);
- BLF_draw(mono, str);
+ BLF_draw(mono, str, 65535); /* XXX, use real length */
return BLF_width(mono, str);
}
static int text_font_draw_character(SpaceText *st, int x, int y, char c)
{
- char str[2];
-
+ char str[1];
str[0]= c;
- str[1]= '\0';
BLF_position(mono, x, y, 0);
- BLF_draw(mono, str);
+ BLF_draw(mono, str, 1);
return st->cwidth;
}