mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-11-23 06:20:22 +00:00
[saco] Implement/match CFontRender::RenderText(...)
This commit is contained in:
parent
aee889c32c
commit
db28736d81
@ -206,3 +206,34 @@ void CFontRender::RenderText(ID3DXSprite *pSprite, char * sz, RECT rect, DWORD d
|
||||
pSprite->End();
|
||||
}
|
||||
|
||||
void CFontRender::RenderText(char *sz, RECT rect, DWORD dwColor)
|
||||
{
|
||||
if(sz == NULL || sz[0] == '\0') return;
|
||||
|
||||
ID3DXSprite *pSprite = field_14;
|
||||
|
||||
pSprite->Begin( D3DXSPRITE_ALPHABLEND );
|
||||
|
||||
if(strlen(sz) > 100000) return;
|
||||
|
||||
strcpy(field_1C, sz);
|
||||
RemoveColorEmbedsFromString(field_1C);
|
||||
DWORD dwStrLen = (DWORD)strlen(field_1C);
|
||||
|
||||
rect.top -= 2;
|
||||
field_10->DrawText(pSprite,field_1C,dwStrLen,&rect,DT_NOCLIP|DT_CENTER|DT_VCENTER,D3DCOLOR_ARGB(180, 240, 238, 228));
|
||||
rect.top += 2;
|
||||
rect.left += 2;
|
||||
field_10->DrawText(pSprite,field_1C,dwStrLen,&rect,DT_NOCLIP|DT_CENTER|DT_VCENTER,D3DCOLOR_ARGB(180, 240, 238, 228));
|
||||
rect.left -= 2;
|
||||
rect.top += 2;
|
||||
field_10->DrawText(pSprite,field_1C,dwStrLen,&rect,DT_NOCLIP|DT_CENTER|DT_VCENTER,D3DCOLOR_ARGB(180, 240, 238, 228));
|
||||
rect.top -= 2;
|
||||
rect.left -= 2;
|
||||
field_10->DrawText(pSprite,field_1C,dwStrLen,&rect,DT_NOCLIP|DT_CENTER|DT_VCENTER,D3DCOLOR_ARGB(180, 240, 238, 228));
|
||||
rect.left += 2;
|
||||
|
||||
field_10->DrawText(pSprite,sz,-1,&rect,DT_NOCLIP|DT_CENTER|DT_VCENTER,dwColor);
|
||||
|
||||
pSprite->End();
|
||||
}
|
||||
|
@ -29,4 +29,5 @@ public:
|
||||
|
||||
void RenderText(ID3DXSprite *pSprite, char * sz, RECT rect, DWORD dwColor, BOOL bShadowed=TRUE);
|
||||
void RenderText(ID3DXSprite *pSprite, char * sz, RECT rect, DWORD dwFormat, DWORD dwColor, BOOL bShadowed=TRUE);
|
||||
void RenderText(char *sz, RECT rect, DWORD dwColor);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user