forked from bartvdbraak/blender
- 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)
This commit is contained in:
parent
bb59977d79
commit
ff22c1de20
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@ -148,19 +149,22 @@ static void draw_marker(TimeMarker *marker)
|
|||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
|
|
||||||
/* and the marker name too, shifted slightly to the top-right */
|
/* and the marker name too, shifted slightly to the top-right */
|
||||||
|
if(strlen(marker->name)>0) {
|
||||||
if(marker->flag & SELECT) {
|
if(marker->flag & SELECT) {
|
||||||
BIF_ThemeColor(TH_TEXT_HI);
|
BIF_ThemeColor(TH_TEXT_HI);
|
||||||
glRasterPos2f(xpos+(4.0*(xspace/xpixels)), 27.0*yspace/ypixels);
|
glRasterPos2f(xpos+(4.0*(xspace/xpixels)),
|
||||||
|
((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BIF_ThemeColor(TH_TEXT);
|
BIF_ThemeColor(TH_TEXT);
|
||||||
if((marker->frame <= G.scene->r.cfra) && (marker->frame+5 > G.scene->r.cfra))
|
if((marker->frame <= G.scene->r.cfra) && (marker->frame+5 > G.scene->r.cfra))
|
||||||
glRasterPos2f(xpos+(4.0*(xspace/xpixels)), 27.0*yspace/ypixels);
|
glRasterPos2f(xpos+(4.0*(xspace/xpixels)),
|
||||||
|
((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels);
|
||||||
else
|
else
|
||||||
glRasterPos2f(xpos+(4.0*(xspace/xpixels)), 17.0*yspace/ypixels);
|
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)
|
static void draw_markers_time(SpaceTime *stime)
|
||||||
|
Loading…
Reference in New Issue
Block a user