Fuzzy timer

This commit is contained in:
Tomi Isoaho 2011-03-14 04:55:53 +00:00
parent 8976e4d47a
commit 37bcb2c318

View file

@ -1003,13 +1003,17 @@ CG_DrawTimer
*/ */
static float CG_DrawTimer(float y) static float CG_DrawTimer(float y)
{ {
char *s; char *s = NULL;
int w; int w;
int mins, seconds, tens; int mins, seconds, tens;
int msec; int msec;
int x = 0; int x = 0;
float Color[4]; float Color[4];
const int expand = 4;
const int corner = 12;
const float shadowAlpha = 0.75f;
y += 4; y += 4;
msec = cg.time - cgs.levelStartTime; msec = cg.time - cgs.levelStartTime;
@ -1023,11 +1027,13 @@ static float CG_DrawTimer(float y)
w = CG_DrawStrlen(s) * SMALLCHAR_WIDTH; w = CG_DrawStrlen(s) * SMALLCHAR_WIDTH;
x = w; x = w;
MAKERGBA(Color, 0.0f, 0.0f, 0.0f, 0.4f); CG_DrawFuzzyShadow(cgs.screenXMax - x - 12 - expand,
CG_FillRect(cgs.screenXMax - x - 12, y - 1, w + 6, SMALLCHAR_HEIGHT + 6, Color); y - 1 - expand,
w + 6 + expand + expand,
MAKERGBA(Color, 0.0f, 0.0f, 0.0f, 1.0f); SMALLCHAR_HEIGHT + 6 + expand + expand,
CG_DrawCleanRect(cgs.screenXMax - x - 12, y - 1, w + 6, SMALLCHAR_HEIGHT + 6, 1, Color); 12,
shadowAlpha
);
CG_DrawSmallString(cgs.screenXMax - x - 9, y + 2, s, 1.0F); CG_DrawSmallString(cgs.screenXMax - x - 9, y + 2, s, 1.0F);