diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-01 18:42:21 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-06-01 18:42:21 +0400 |
commit | 32fe2d71fc74b3931dc189590e8b1e4636f1af73 (patch) | |
tree | ac12286e9ff646672e6774eca652a509e63ba249 /source/blender/editors/interface/interface_draw.c | |
parent | 1e17f0b1b2d1b143118fd29672582797597c3965 (diff) |
Theme color for frame nodes. The alpha value from this theme color is also used when drawing frames with a custom color (which is just RGB).
Diffstat (limited to 'source/blender/editors/interface/interface_draw.c')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index e535990e7e9..a0b418c1a9a 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -1663,12 +1663,12 @@ void uiDrawBoxShadow(unsigned char alpha, float minx, float miny, float maxx, fl } -void ui_dropshadow(rctf *rct, float radius, float aspect, int UNUSED(select)) +void ui_dropshadow(rctf *rct, float radius, float aspect, float alpha, int UNUSED(select)) { int i; float rad; float a; - char alpha = 2; + float dalpha = alpha * 2.0f/255.0f, calpha; glEnable(GL_BLEND); @@ -1688,10 +1688,11 @@ void ui_dropshadow(rctf *rct, float radius, float aspect, int UNUSED(select)) a = i * aspect; } + calpha = dalpha; for (; i--; a -= aspect) { /* alpha ranges from 2 to 20 or so */ - glColor4ub(0, 0, 0, alpha); - alpha += 2; + glColor4f(0.0f, 0.0f, 0.0f, calpha); + calpha += dalpha; uiDrawBox(GL_POLYGON, rct->xmin - a, rct->ymin - a, rct->xmax + a, rct->ymax - 10.0f + a, rad + a); } |