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:
authorTon Roosendaal <ton@blender.org>2009-04-10 20:30:28 +0400
committerTon Roosendaal <ton@blender.org>2009-04-10 20:30:28 +0400
commit4e81404d7eb00d7373ea8e4c01ae8bdfad287d72 (patch)
treee0414e0bea32707785061910589d173c112756a6 /source/blender/editors/animation
parent61249337817d3699ca961c9e4007cb0cdb232051 (diff)
2.5
Grand cleanup: - removal of FTF and ftfont dir - removal of text.c which wrapped it - wrapped old text drawing code temporarily, need to decide how 'style' will behave per editor when you draw strings outside interface code.... wouldn't be very useful to set fonts locally all over?
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_draw.c6
-rw-r--r--source/blender/editors/animation/anim_markers.c23
-rw-r--r--source/blender/editors/animation/keyframes_draw.c1
3 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index e0962eadfca..7f07de80754 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -62,7 +62,6 @@
#include "UI_interface.h"
#include "UI_resources.h"
-#include "UI_text.h"
#include "UI_view2d.h"
/* XXX */
@@ -86,7 +85,7 @@ static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time)
sprintf(str, " %.2f", FRA2TIME(CFRA));
else
sprintf(str, " %d", CFRA);
- slen= (short)UI_GetStringWidth(G.font, str, 0) - 1;
+ slen= (short)UI_GetStringWidth(str) - 1;
/* get starting coordinates for drawing */
x= cfra * xscale;
@@ -98,8 +97,7 @@ static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time)
/* draw current frame number - black text */
UI_ThemeColor(TH_TEXT);
- ui_rasterpos_safe(x-5, y+3, 1.0f);
- UI_DrawString(G.fonts, str, 0); // XXX may need to be updated for font stuff
+ UI_DrawString(x-5, y+3, str); // XXX may need to be updated for font stuff
/* restore view transform */
glScalef(xscale, 1.0, 1.0);
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index fc52d9c4511..58e3aa8e172 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -57,7 +57,6 @@
#include "UI_interface_icons.h"
#include "UI_view2d.h"
#include "UI_resources.h"
-#include "UI_text.h"
#include "ED_markers.h"
#include "ED_screen.h"
@@ -85,9 +84,6 @@ static ListBase *context_get_markers(const bContext *C)
/* ************* Marker Drawing ************ */
-/* XXX */
-extern void ui_rasterpos_safe(float x, float y, float aspect);
-
/* function to draw markers */
static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
{
@@ -140,18 +136,25 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
/* and the marker name too, shifted slightly to the top-right */
if (marker->name && marker->name[0]) {
+ float x, y;
+
if(marker->flag & SELECT) {
UI_ThemeColor(TH_TEXT_HI);
- ui_rasterpos_safe(xpos*xscale+4.0, (ypixels<=39.0)?(ypixels-10.0):29.0, 1.0);
+ x= xpos*xscale+4.0;
+ y= (ypixels<=39.0)?(ypixels-10.0):29.0;
}
else {
UI_ThemeColor(TH_TEXT);
- if((marker->frame <= cfra) && (marker->frame+5 > cfra))
- ui_rasterpos_safe(xpos*xscale+4.0, (ypixels<=39.0)?(ypixels-10.0):29.0, 1.0);
- else
- ui_rasterpos_safe(xpos*xscale+4.0, 17.0, 1.0);
+ if((marker->frame <= cfra) && (marker->frame+5 > cfra)) {
+ x= xpos*xscale+4.0;
+ y= (ypixels<=39.0)?(ypixels-10.0):29.0;
+ }
+ else {
+ x= xpos*xscale+4.0;
+ y= 17.0;
+ }
}
- UI_DrawString(G.font, marker->name, 0);
+ UI_DrawString(x, y, marker->name);
}
glScalef(xscale, 1.0, 1.0);
}
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index 6e58efbe73b..cfbd6d2bced 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -83,7 +83,6 @@
#include "UI_interface.h"
#include "UI_interface_icons.h"
#include "UI_resources.h"
-#include "UI_text.h"
#include "UI_view2d.h"
#include "ED_anim_api.h"