From 9ab3e7e121a856f7642c5066e250aa6fe2df685e Mon Sep 17 00:00:00 2001 From: oy Date: Sun, 12 Sep 2010 13:18:11 +0200 Subject: fixed overlapping voting. Closes #100 --- src/game/client/components/hud.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/client/components/hud.cpp b/src/game/client/components/hud.cpp index 192238e3..b9f20231 100644 --- a/src/game/client/components/hud.cpp +++ b/src/game/client/components/hud.cpp @@ -213,10 +213,14 @@ void CHud::RenderVoting() TextRender()->TextColor(1,1,1,1); char Buf[512]; - TextRender()->Text(0x0, 5, 60, 6, m_pClient->m_pVoting->VoteDescription(), -1); - str_format(Buf, sizeof(Buf), Localize("%ds left"), m_pClient->m_pVoting->SecondsLeft()); float tw = TextRender()->TextWidth(0x0, 6, Buf, -1); + + CTextCursor Cursor; + TextRender()->SetCursor(&Cursor, 5.0f, 60.0f, 6.0f, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END); + Cursor.m_LineWidth = 100-tw; + TextRender()->TextEx(&Cursor, m_pClient->m_pVoting->VoteDescription(), -1); + TextRender()->Text(0x0, 5+100-tw, 60, 6, Buf, -1); -- cgit 1.4.1