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).

This commit is contained in:
Lukas Toenne
2012-06-01 14:42:21 +00:00
parent 1e17f0b1b2
commit 32fe2d71fc
9 changed files with 3224 additions and 3209 deletions

View File

@@ -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);
}