about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/game/client/components/hud.cpp8
1 files changed, 6 insertions, 2 deletions
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);