diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-04-07 02:15:26 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-04-07 02:15:26 +0300 |
commit | f69678482c849d873b9686cd6068946205db7c2b (patch) | |
tree | 3ffd7dee52bac6d5706b5e6b64983290dd3ebed6 /source/blender/editors/interface/interface_style.c | |
parent | 934dfc420088b4ce06bb050ade1ab6a4fa8e6d72 (diff) |
OpenGL: refactor UI_draw_roundbox functions
Each function takes a bool (filled vs outline) and a color. We already had multiple ways of passing color in; these are still here. Special variant for anti-aliasing.
- took GLenum out of interface
- removed UI_RB_ALPHA flag (only one place really used it)
- use exact vertex count
- removed redundant state changes (BLEND, LINE_SMOOTH)
Diffstat (limited to 'source/blender/editors/interface/interface_style.c')
-rw-r--r-- | source/blender/editors/interface/interface_style.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 01bce9d7bdc..01456e2e122 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -310,17 +310,17 @@ void UI_fontstyle_draw_simple_backdrop( const float margin = height / 4.0f; /* backdrop */ + float color[4] = { col_bg[0], col_bg[1], col_bg[2], 0.5f }; - UI_draw_roundbox_corner_set(UI_CNR_ALL | UI_RB_ALPHA); - UI_draw_roundbox( + UI_draw_roundbox_corner_set(UI_CNR_ALL); + UI_draw_roundbox_aa(true, x - margin, (y + decent) - margin, x + width + margin, (y + decent) + height + margin, - margin, col_bg); + margin, color); } - BLF_position(fs->uifont_id, x, y, 0.0f); BLF_color4fv(fs->uifont_id, col_fg); BLF_draw(fs->uifont_id, str, BLF_DRAW_STR_DUMMY_MAX); |