diff options
author | Ton Roosendaal <ton@blender.org> | 2003-10-05 00:35:50 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-10-05 00:35:50 +0400 |
commit | 842bb449c57fc95d7590574cc5d15753459bffe4 (patch) | |
tree | 8ea0722c505073b031c30705f7e19fd84ffbe072 /source/blender/src/drawtext.c | |
parent | c355aa06a8d4a921c29188081735b29722009416 (diff) |
huge commit, sorry!
this is part 1 of the UI makeover. It has:
- menu system from Matt integrated
- buttons drawing from Matt
- generic button panel system implemented
- converted displaybuttons (not the rest yet)
- cleaned up a lot in drawing spaces itself, to make it aligned and pixel exact.
- cleaned loads of little compiler warnings, protos...
still a lot of work needed, will all be in next week i hope!
(warn: 2 new c files! butspace.c and buttons_scene.c)
Diffstat (limited to 'source/blender/src/drawtext.c')
-rw-r--r-- | source/blender/src/drawtext.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c index 6623b101208..35b80755c7c 100644 --- a/source/blender/src/drawtext.c +++ b/source/blender/src/drawtext.c @@ -32,6 +32,7 @@ #include <stdlib.h> #include <math.h> +#include <string.h> #ifdef HAVE_CONFIG_H #include <config.h> @@ -290,11 +291,13 @@ static void draw_cursor(SpaceText *st) { glColor3f(0.75, 0.44, 0.44); - if(st->showlinenrs) + if(st->showlinenrs) { if (!x) x= TXT_OFFSET + TEXTXLOC -4; - else + } + else { if (!x) x= TXT_OFFSET - 4; - + } + if (!x) x= TXT_OFFSET-10; while (linef && linef != linel) { h= txt_get_span(text->lines.first, linef) - st->top; @@ -549,7 +552,9 @@ void drawtextspace(ScrArea *sa, void *spacedata) glClearColor(0.6, 0.6, 0.6, 1.0); glClear(GL_COLOR_BUFFER_BIT); - myortho2(-0.5, curarea->winrct.xmax-curarea->winrct.xmin-0.5, -0.5, curarea->winrct.ymax-curarea->winrct.ymin-0.5); + myortho2(-0.5, (float)(sa->winx)-.05, -0.5, (float)(sa->winy)-0.5); + + draw_area_emboss(sa); text= st->text; if(!text) return; |