mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-11-23 14:29:52 +00:00
[saco] Implement/match CFontRender::MeasureText2(...)
This commit is contained in:
parent
05250c0aa2
commit
0a6d658266
@ -119,6 +119,22 @@ SIZE CFontRender::MeasureText(char * szString, DWORD dwFormat)
|
||||
return ret;
|
||||
}
|
||||
|
||||
SIZE CFontRender::MeasureText2(char * szString, DWORD dwFormat)
|
||||
{
|
||||
RECT rect;
|
||||
SIZE ret = {0, 0};
|
||||
|
||||
if(strlen(szString) > 100000) return ret;
|
||||
|
||||
strcpy(field_1C,szString);
|
||||
RemoveColorEmbedsFromString(field_1C);
|
||||
field_4->DrawTextA(NULL,field_1C,-1,&rect,dwFormat|DT_CALCRECT,0xFF000000);
|
||||
ret.cx = rect.right - rect.left;
|
||||
ret.cy = rect.bottom - rect.top;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void CFontRender::RenderText(ID3DXSprite * pSprite, char * sz, RECT rect, DWORD dwColor, BOOL bShadowed)
|
||||
{
|
||||
// TODO: CFontRender::RenderText .text:1006B360
|
||||
|
@ -25,6 +25,7 @@ public:
|
||||
void RestoreDeviceObjects();
|
||||
|
||||
SIZE MeasureText(char * szString, DWORD dwFormat = DT_LEFT);
|
||||
SIZE MeasureText2(char * szString, DWORD dwFormat = DT_LEFT);
|
||||
|
||||
void RenderText(ID3DXSprite * pSprite, char * sz, RECT rect, DWORD dwColor, BOOL bShadowed = TRUE);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user