diff options
author | Jiri Hnidek <jiri.hnidek@tul.cz> | 2005-09-20 20:36:07 +0400 |
---|---|---|
committer | Jiri Hnidek <jiri.hnidek@tul.cz> | 2005-09-20 20:36:07 +0400 |
commit | ff22c1de20994d3ced0eac45c8d24c06c7ed28eb (patch) | |
tree | 3151c78847b87f47f41da8ad1c3f5b98a760bd04 /source/blender/src/drawtime.c | |
parent | bb59977d79457b4cc448c7240e3bd61c8a069ce8 (diff) |
- name of marker is printed only when strlen(marker->name) is bigger then
zero
- bug fix (feature request): name of marker isn't pushed out of window,
when timeline window isn't very high (thanks Matt for bug report)
Diffstat (limited to 'source/blender/src/drawtime.c')
-rw-r--r-- | source/blender/src/drawtime.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/source/blender/src/drawtime.c b/source/blender/src/drawtime.c index 1a2547b2aec..5915c1aaf83 100644 --- a/source/blender/src/drawtime.c +++ b/source/blender/src/drawtime.c @@ -32,6 +32,7 @@ #include <math.h> #include <stdio.h> +#include <string.h> #ifdef HAVE_CONFIG_H #include <config.h> @@ -148,19 +149,22 @@ static void draw_marker(TimeMarker *marker) glDisable(GL_BLEND); /* and the marker name too, shifted slightly to the top-right */ - if(marker->flag & SELECT) { - BIF_ThemeColor(TH_TEXT_HI); - glRasterPos2f(xpos+(4.0*(xspace/xpixels)), 27.0*yspace/ypixels); - } - else { - BIF_ThemeColor(TH_TEXT); - if((marker->frame <= G.scene->r.cfra) && (marker->frame+5 > G.scene->r.cfra)) - glRasterPos2f(xpos+(4.0*(xspace/xpixels)), 27.0*yspace/ypixels); - else - glRasterPos2f(xpos+(4.0*(xspace/xpixels)), 17.0*yspace/ypixels); + if(strlen(marker->name)>0) { + if(marker->flag & SELECT) { + BIF_ThemeColor(TH_TEXT_HI); + glRasterPos2f(xpos+(4.0*(xspace/xpixels)), + ((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels); + } + else { + BIF_ThemeColor(TH_TEXT); + if((marker->frame <= G.scene->r.cfra) && (marker->frame+5 > G.scene->r.cfra)) + glRasterPos2f(xpos+(4.0*(xspace/xpixels)), + ((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels); + else + glRasterPos2f(xpos+(4.0*(xspace/xpixels)), 17.0*yspace/ypixels); + } + BMF_DrawString(G.font, marker->name); } - - BMF_DrawString(G.font, marker->name); } static void draw_markers_time(SpaceTime *stime) |