diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-11-30 10:03:10 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-11-30 10:03:10 +0400 |
commit | 3612a8d3d4605cac1988d58b8af561e69f4130ab (patch) | |
tree | d17140e64c962897b50c77d4e52388aa0442f2a1 /source/blender/editors/space_clip | |
parent | 377d5232d4465ca23b06b6550c78b2fe1a697532 (diff) |
Deduplicate code used for drawing text information at the top of space region.
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index a53da4ce006..3f9ec3f3c82 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -204,29 +204,8 @@ static void draw_movieclip_notes(SpaceClip *sc, ARegion *ar) strcpy(str, "Locked"); } - if(str[0]) { - uiStyle *style= UI_GetStyle(); - int fontid= style->widget.uifont_id; - int fontwidth; - - BLF_size(fontid, 11.0f, 72); - - if(block) - fontwidth= ar->winx; - else - fontwidth= BLF_width(fontid, str); - - glEnable(GL_BLEND); - - glColor4f(0.0f, 0.0f, 0.0f, 0.6f); - glRecti(0, ar->winy-17, fontwidth+12, ar->winy); - - glColor3f(1.0f, 1.0f, 1.0f); - BLF_position(fontid, 6.0f, ar->winy-13.0f, 0.0f); - BLF_draw(fontid, str, strlen(str)); - - glDisable(GL_BLEND); - } + if(str[0]) + ED_region_info_draw(ar, str, block, 0.6f); } static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf, |