mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Merge pull request #2007 from Dune-jr/fix-scorehud-id
Fix missing GetClientIdRectSize in textwidth computation for score hud
This commit is contained in:
commit
0b642df946
|
@ -292,7 +292,7 @@ void CHud::RenderScoreHud()
|
||||||
int ID = aPlayerInfo[t].m_ClientID;
|
int ID = aPlayerInfo[t].m_ClientID;
|
||||||
char aName[64];
|
char aName[64];
|
||||||
str_format(aName, sizeof(aName), "%s", g_Config.m_ClShowsocial ? m_pClient->m_aClients[ID].m_aName : "");
|
str_format(aName, sizeof(aName), "%s", g_Config.m_ClShowsocial ? m_pClient->m_aClients[ID].m_aName : "");
|
||||||
float w = TextRender()->TextWidth(0, 8.0f, aName, -1);
|
float w = TextRender()->TextWidth(0, 8.0f, aName, -1) + RenderTools()->GetClientIdRectSize(8.0f);
|
||||||
|
|
||||||
CTextCursor Cursor;
|
CTextCursor Cursor;
|
||||||
float x = min(Whole-w-1.0f, Whole-ScoreWidthMax-ImageSize-2*Split-PosSize);
|
float x = min(Whole-w-1.0f, Whole-ScoreWidthMax-ImageSize-2*Split-PosSize);
|
||||||
|
|
Loading…
Reference in a new issue