From: FruitieX Date: Sun, 13 Jun 2010 10:49:55 +0000 (+0300) Subject: fake the chat messages with drawcolorcodedstring() when in hud_configure mode so... X-Git-Tag: xonotic-v0.1.0preview~541^2~51 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b43a794e80d0bda0fb114cfd19a190ce149d995c;p=xonotic%2Fxonotic-data.pk3dir.git fake the chat messages with drawcolorcodedstring() when in hud_configure mode so we dont have to spam the console (and can see the chat text if the menu is up) --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index c507a936e..5bb8307d6 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -3834,7 +3834,6 @@ void HUD_DrawPressedKeys(void) // Handle chat as a panel (#12) // -float chat_prevtime; void HUD_Chat(void) { float id = HUD_PANEL_CHAT; @@ -3861,17 +3860,11 @@ void HUD_Chat(void) if(hud_configure) { - if(chat_prevtime != floor(time/5)) + cvar_set("con_chatrect_x", "9001"); // over 9000, we'll fake it instead for more control over alpha and such + float i; + for(i = 0; i < cvar("con_chat"); ++i) { - chat_prevtime = floor(time/5); - - float sound_prev; - sound_prev = cvar("con_chatsound"); - - // disable chat bleep - cvar_set("con_chatsound", "0"); - print("\x01Player^7: This is the chat area\n"); - cvar_set("con_chatsound", ftos(sound_prev)); + drawcolorcodedstring(pos + eY * i * cvar("con_chatsize"), "^3Player^7: This is the chat area.", '1 1 0' * cvar("con_chatsize"), HUD_Panel_GetFgAlpha(id), DRAWFLAG_NORMAL); } } }