The default PrintText I use function:
[PHP]void PrintText(char pString[], int x, int y, D3DCOLOR col, ID3DXFont *font)
{
RECT FontRect = { x, y, x+500, y+30 };
font->DrawText( NULL, pString, -1, &FontRect, DT_LEFT | DT_WORDBREAK, col);
}[/PHP]
Using:
[PHP]PrintText("", x, y, D3DCOLOR_XRGB(Red, Green, Blue), pFont)[/PHP]
PrintText - Shadow upper-right function:
[PHP]void ShadowedUR(char pString[], int x, int y, D3DCOLOR col, D3DCOLOR colshadow, ID3DXFont *font)
{
// Shadow
RECT FontRect2 = { x+2, y-2, x+500, y+30 };
font->DrawText( NULL, pString, -1, &FontRect2, DT_LEFT | DT_WORDBREAK, colshadow);
// Text
RECT FontRect = { x, y, x+500, y+30 };
font->DrawText( NULL, pString, -1, &FontRect, DT_LEFT | DT_WORDBREAK, col);
}[/PHP]
PrintText - Shadow upper-right use:
[PHP]ShadowedUR("", x, y, D3DCOLOR_XRGB(Red, Green, Blue), D3DCOLOR(0, 0, 0), pFont)[/PHP]
PrintText - Shadow lower-right function:
[PHP]void ShadowedLR(char pString[], int x, int y, D3DCOLOR col, D3DCOLOR colshadow, ID3DXFont *font)
{
// Shadow
RECT FontRect2 = { x+2, y+2, x+500, y+30 };
font->DrawText( NULL, pString, -1, &FontRect2, DT_LEFT | DT_WORDBREAK, colshadow);
// Text
RECT FontRect = { x, y, x+500, y+30 };
font->DrawText( NULL, pString, -1, &FontRect, DT_LEFT | DT_WORDBREAK, col);
}[/PHP]
PrintText - Shadow lower-right use:
[PHP]ShadowedLR("", x, y, D3DCOLOR_XRGB(Red, Green, Blue), D3DCOLOR(0, 0, 0), pFont)[/PHP]
PrintText - Shadow upper-left function:
[PHP]void ShadowedUL(char pString[], int x, int y, D3DCOLOR col, D3DCOLOR colshadow, ID3DXFont *font)
{
// Shadow
RECT FontRect2 = { x-2, y-2, x+500, y+30 };
font->DrawText( NULL, pString, -1, &FontRect2, DT_LEFT | DT_WORDBREAK, colshadow);
// Text
RECT FontRect = { x, y, x+500, y+30 };
font->DrawText( NULL, pString, -1, &FontRect, DT_LEFT | DT_WORDBREAK, col);
}[/PHP]
PrintText - Shadow upper-left use:
[PHP]ShadowedUL("", x, y, D3DCOLOR_XRGB(Red, Green, Blue), D3DCOLOR(0, 0, 0), pFont)[/PHP]
PrintText - Shadow lower-left function:
[PHP]void ShadowedLL(char pString[], int x, int y, D3DCOLOR col, D3DCOLOR colshadow, ID3DXFont *font)
{
// Shadow
RECT FontRect2 = { x+2, y+2, x+500, y+30 };
font->DrawText( NULL, pString, -1, &FontRect2, DT_LEFT | DT_WORDBREAK, colshadow);
// Text
RECT FontRect = { x, y, x+500, y+30 };
font->DrawText( NULL, pString, -1, &FontRect, DT_LEFT | DT_WORDBREAK, col);
}[/PHP]
PrintText - Shadow lower-left use:
[PHP]ShadowedLL("", x, y, D3DCOLOR_XRGB(Red, Green, Blue), D3DCOLOR(0, 0, 0), pFont)[/PHP]
Example:
[PHP]ShadowedUL("Upper-Left Shadow", 10, 13, D3DCOLOR_XRGB(255, 0, 0), D3DCOLOR_XRGB(0, 0, 0), pFont);
ShadowedLL("Lower-Left Shadow", 150, 13, D3DCOLOR_XRGB(255, 0, 0), D3DCOLOR_XRGB(0, 0, 0), pFont);
ShadowedUR("Upper-Right Shadow", 300, 13, D3DCOLOR_XRGB(255, 0, 0), D3DCOLOR_XRGB(0, 0, 0), pFont);
ShadowedLR("Lower-Right Shadow", 450, 13, D3DCOLOR_XRGB(255, 0, 0), D3DCOLOR_XRGB(0, 0, 0), pFont);[/PHP]
Remember to give credits and press thanks!