Consider material text icons when calculating text width

This commit is contained in:
Jan
2021-08-22 20:51:57 +02:00
parent 0875a87e26
commit 57e305277b
6 changed files with 85 additions and 0 deletions

View File

@ -279,6 +279,7 @@ namespace Game
SE_Load_t SE_Load = SE_Load_t(0x502A30);
SEH_StringEd_GetString_t SEH_StringEd_GetString = SEH_StringEd_GetString_t(0x44BB30);
SEH_ReadCharFromString_t SEH_ReadCharFromString = SEH_ReadCharFromString_t(0x486560);
Dvar_SetFromStringByName_t Dvar_SetFromStringByName = Dvar_SetFromStringByName_t(0x4F52E0);
Dvar_SetFromStringByNameFromSource_t Dvar_SetFromStringByNameFromSource = Dvar_SetFromStringByNameFromSource_t(0x4FC770);
@ -1258,5 +1259,19 @@ namespace Game
retn
}
}
__declspec(naked) Glyph* R_GetCharacterGlyph(Font_s* font, unsigned int letter)
{
__asm
{
mov edi, [esp + 8]
push [esp+4]
mov eax, 0x5055C0
call eax
add esp,0x4
retn
}
}
#pragma optimize("", on)
}

View File

@ -669,6 +669,9 @@ namespace Game
typedef char* (__cdecl * SEH_StringEd_GetString_t)(const char* string);
extern SEH_StringEd_GetString_t SEH_StringEd_GetString;
typedef int (__cdecl* SEH_ReadCharFromString_t)(const char** text, int* isTrailingPunctuation);
extern SEH_ReadCharFromString_t SEH_ReadCharFromString;
typedef char* (__cdecl * SL_ConvertToString_t)(unsigned short stringValue);
extern SL_ConvertToString_t SL_ConvertToString;
@ -951,4 +954,6 @@ namespace Game
void R_AddDebugString(float *color, float *pos, float scale, const char *str);
void R_AddDebugBounds(float* color, Bounds* b);
void R_AddDebugBounds(float* color, Bounds* b, const float(*quat)[4]);
Glyph* R_GetCharacterGlyph(Font_s* font, unsigned int letter);
}