about summary refs log tree commit diff
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-03-27 23:43:45 +0200
committeroy <Tom_Adams@web.de>2011-03-27 23:43:45 +0200
commit63d2019b1913f6d467901022d460edfea62b2c6f (patch)
treedf07a0dd83eb5bf3494907c42904f18c484d0791
parent7bd79f9f4399c63d2d9cd77d7cb2ff58b84d5e32 (diff)
downloadzcatch-63d2019b1913f6d467901022d460edfea62b2c6f.tar.gz
zcatch-63d2019b1913f6d467901022d460edfea62b2c6f.zip
fixed that chat overlaps the spectator hud
-rw-r--r--src/game/client/components/chat.cpp5
1 files changed, 3 insertions, 2 deletions
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)