mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed overlapping voting. Closes #100
This commit is contained in:
parent
daab7fdcd4
commit
9ab3e7e121
|
@ -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);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue