From 63d2019b1913f6d467901022d460edfea62b2c6f Mon Sep 17 00:00:00 2001 From: oy Date: Sun, 27 Mar 2011 23:43:45 +0200 Subject: fixed that chat overlaps the spectator hud --- src/game/client/components/chat.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/game/client/components/chat.cpp') diff --git a/src/game/client/components/chat.cpp b/src/game/client/components/chat.cpp index 203fcf02..cc65e955 100644 --- a/src/game/client/components/chat.cpp +++ b/src/game/client/components/chat.cpp @@ -306,7 +306,8 @@ void CChat::AddLine(int ClientID, int Team, const char *pLine) void CChat::OnRender() { - Graphics()->MapScreen(0,0,300*Graphics()->ScreenAspect(),300); + float Width = 300.0f*Graphics()->ScreenAspect(); + Graphics()->MapScreen(0.0f, 0.0f, Width, 300.0f); float x = 5.0f; float y = 300.0f-20.0f; if(m_Mode != MODE_NONE) @@ -314,7 +315,7 @@ void CChat::OnRender() // render chat input CTextCursor Cursor; TextRender()->SetCursor(&Cursor, x, y, 8.0f, TEXTFLAG_RENDER); - Cursor.m_LineWidth = 200.0f; + Cursor.m_LineWidth = Width-190.0f; Cursor.m_MaxLines = 2; if(m_Mode == MODE_ALL) -- cgit 1.4.1