Fixed show ids

Fixed missing letter
This commit is contained in:
GreYFoX 2011-02-23 18:12:34 +02:00
parent 9e15232e20
commit 0e5ef2e4f4
2 changed files with 11 additions and 3 deletions

View file

@ -718,13 +718,13 @@ void CMenus::RenderSettingsDDRace(CUIRect MainView)
}
MainView.HSplitTop(20.0f, &Button, &MainView);
if(DoButton_CheckBox(&g_Config.m_ClRaceShowGhost, Localize("Enable show ghos"), g_Config.m_ClRaceShowGhost, &Button))
if(DoButton_CheckBox(&g_Config.m_ClRaceShowGhost, Localize("Enable show ghost"), g_Config.m_ClRaceShowGhost, &Button))
{
g_Config.m_ClRaceShowGhost ^= 1;
}
MainView.HSplitTop(20.0f, &Button, &MainView);
if(DoButton_CheckBox(&g_Config.m_ClRaceSaveGhost, Localize("Enable save ghos"), g_Config.m_ClRaceSaveGhost, &Button))
if(DoButton_CheckBox(&g_Config.m_ClRaceSaveGhost, Localize("Enable save ghost"), g_Config.m_ClRaceSaveGhost, &Button))
{
g_Config.m_ClRaceSaveGhost ^= 1;
}

View file

@ -266,7 +266,15 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
FontSizeResize = FontSize;
while(TextRender()->TextWidth(0, FontSizeResize, m_pClient->m_aClients[pInfo->m_ClientID].m_aName, -1) > w-163.0f-PingWidth)
--FontSizeResize;
TextRender()->Text(0, x+128.0f, y+(FontSize-FontSizeResize)/2, FontSizeResize, m_pClient->m_aClients[pInfo->m_ClientID].m_aName, -1);
if (m_IsGameTypeRace && g_Config.m_ClShowIDs)
{
char aId[64] = "";
str_format(aId, sizeof(aId),"%d:", pInfo->m_ClientID);
str_append(aId, m_pClient->m_aClients[pInfo->m_ClientID].m_aName,sizeof(aId));
TextRender()->Text(0, x+128.0f+Offset, y+(FontSize-FontSizeResize)/2, FontSizeResize, aId, -1);
}
else
TextRender()->Text(0, x+128.0f+Offset, y+(FontSize-FontSizeResize)/2, FontSizeResize, m_pClient->m_aClients[pInfo->m_ClientID].m_aName, -1);
FontSizeResize = FontSize;
str_format(aBuf, sizeof(aBuf), "%d", clamp(pInfo->m_Latency, -9999, 9999));
while((Width = TextRender()->TextWidth(0, FontSizeResize, aBuf, -1)) > PingWidth)