Skip to content

Commit

Permalink
Fixed All games: Menu-shadow did not work.
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed May 12, 2010
1 parent 56cd04d commit ea7313f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion doomsday/plugins/common/include/hu_stuff.h
Expand Up @@ -108,7 +108,7 @@ void WI_DrawPatch(int x, int y, float r, float g, float b, float a,
void WI_DrawParamText(int x, int y, const char* string,
gamefontid_t font, float defRed,
float defGreen, float defBlue, float defAlpha,
boolean defCase, boolean defTypeIn,
boolean defCase, boolean defTypeIn, boolean defShadow,
int halign);
void M_WriteText(int x, int y, const char *string);
void M_WriteText2(int x, int y, const char *string,
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/common/src/hu_log.c
Expand Up @@ -413,7 +413,7 @@ void Hu_LogDrawer(int player, float textAlpha, float iconAlpha,
// Draw using param text.
// Messages may use the params to override the way the message is
// is displayed, e.g. colour (Hexen's important messages).
WI_DrawParamText(0, y, msg->text, GF_FONTA, col[CR], col[CG], col[CB], col[CA], false, false, cfg.msgAlign);
WI_DrawParamText(0, y, msg->text, GF_FONTA, col[CR], col[CG], col[CB], col[CA], false, false, false, cfg.msgAlign);

width = M_StringWidth(msg->text, GF_FONTA);
height = M_StringHeight(msg->text, GF_FONTA);
Expand Down Expand Up @@ -852,7 +852,7 @@ void Chat_Drawer(int player, float textAlpha, float iconAlpha,
xOffset = -M_CharWidth('_', GF_FONTA);
}

WI_DrawParamText(xOffset, 0, str, GF_FONTA, cfg.hudColor[CR], cfg.hudColor[CG], cfg.hudColor[CB], textAlpha, false, false, cfg.msgAlign);
WI_DrawParamText(xOffset, 0, str, GF_FONTA, cfg.hudColor[CR], cfg.hudColor[CG], cfg.hudColor[CB], textAlpha, false, false, false, cfg.msgAlign);
*drawnWidth = M_StringWidth(chat->buffer.l.l, GF_FONTA) + M_CharWidth('_', GF_FONTA);
*drawnHeight = MAX_OF(M_StringHeight(chat->buffer.l.l, GF_FONTA), M_CharHeight('_', GF_FONTA));
}
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/common/src/hu_menu.c
Expand Up @@ -1726,7 +1726,7 @@ void Hu_MenuDrawer(void)
currentMenu->items[i].text, currentMenu->font,
r, g, b, menuAlpha,
false,
cfg.usePatchReplacement? true : false,
cfg.usePatchReplacement? true : false, true,
ALIGN_LEFT);
}

Expand Down Expand Up @@ -2292,7 +2292,7 @@ void M_DrawTitle(char *text, int y)
{
WI_DrawParamText(160 - M_StringWidth(text, GF_FONTB) / 2, y, text,
GF_FONTB, cfg.menuColor[0], cfg.menuColor[1],
cfg.menuColor[2], menuAlpha, true, true, ALIGN_LEFT);
cfg.menuColor[2], menuAlpha, true, true, true, ALIGN_LEFT);
}

boolean MN_IsItemVisible(const menu_t* menu, int item)
Expand Down
11 changes: 5 additions & 6 deletions doomsday/plugins/common/src/hu_stuff.c
Expand Up @@ -1472,7 +1472,7 @@ float WI_ParseFloat(char** str)
*/
void WI_DrawParamText(int x, int y, const char* inString, gamefontid_t defFont,
float defRed, float defGreen, float defBlue, float defAlpha, boolean defCase,
boolean defTypeIn, int halign)
boolean defTypeIn, boolean defShadow, int halign)
{
#define SMALLBUFF_SIZE 80

Expand Down Expand Up @@ -1762,8 +1762,7 @@ void WI_DrawParamText(int x, int y, const char* inString, gamefontid_t defFont,
DGL_Scalef(scaleX, scaleY * extraScale, 1);

// Draw it.
M_WriteText3(0, 0, temp, font, r, g, b, a, typeIn, false,
typeIn ? charCount : 0);
M_WriteText3(0, 0, temp, font, r, g, b, a, typeIn, defShadow, typeIn ? charCount : 0);
charCount += strlen(temp);

// Advance the current position.
Expand Down Expand Up @@ -2350,7 +2349,7 @@ void WI_DrawPatch(int x, int y, float r, float g, float b, float a,
{ // We have already determined a string to replace this with.
if(W_IsFromIWAD(patch->lump))
{
WI_DrawParamText(x, y, altstring, GF_FONTB, r, g, b, a, false, true, halign);
WI_DrawParamText(x, y, altstring, GF_FONTB, r, g, b, a, false, true, true, halign);
return;
}
}
Expand All @@ -2366,14 +2365,14 @@ void WI_DrawPatch(int x, int y, float r, float g, float b, float a,
// A user replacement?
if(patchString)
{
WI_DrawParamText(x, y, string, GF_FONTB, r, g, b, a, false, true, halign);
WI_DrawParamText(x, y, string, GF_FONTB, r, g, b, a, false, true, true, halign);
return;
}

// A built-in replacement?
if(cfg.usePatchReplacement == 2 && altstring && altstring[0])
{
WI_DrawParamText(x, y, altstring, GF_FONTB, r, g, b, a, false, true, halign);
WI_DrawParamText(x, y, altstring, GF_FONTB, r, g, b, a, false, true, true, halign);
return;
}
}
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/jhexen/src/st_stuff.c
Expand Up @@ -2013,7 +2013,7 @@ void drawWorldTimerWidget(int player, float textAlpha, float iconAlpha,
}
*drawnWidth = M_StringWidth(buf, GF_FONTA);
*drawnHeight = M_StringHeight(buf, GF_FONTA);
WI_DrawParamText(0, 0, buf, GF_FONTA, 1, 1, 1, textAlpha, false, false, ALIGN_RIGHT);
WI_DrawParamText(0, 0, buf, GF_FONTA, 1, 1, 1, textAlpha, false, false, false, ALIGN_RIGHT);
}

typedef struct {
Expand Down

0 comments on commit ea7313f

Please sign in to comment.