//============================================================================
-qboolean chat_team;
+int chat_mode;
char chat_buffer[MAX_INPUTLINE];
unsigned int chat_bufferlen = 0;
if (key == K_ENTER || ascii == 10 || ascii == 13)
{
- Cmd_ForwardStringToServer(va("%s %s", chat_team ? "say_team" : "say ", chat_buffer));
+ if(chat_mode < 0)
+ Cbuf_AddText(va("%s\n", chat_buffer));
+ else
+ Cmd_ForwardStringToServer(va("%s %s", chat_mode ? "say_team" : "say ", chat_buffer));
key_dest = key_game;
chat_bufferlen = 0;
return;
}
+ // TODO add support for arrow keys and simple editing
+
if (key == K_ESCAPE) {
key_dest = key_game;
chat_bufferlen = 0;
return;
}
+ // handle toggleconsole in menu too
+ if (keydest == key_menu)
+ {
+ if (down && con_closeontoggleconsole.integer && bind && !strncmp(bind, "toggleconsole", strlen("toggleconsole")) && ascii != STRING_COLOR_TAG)
+ {
+ Con_ToggleConsole_f ();
+ tbl_keydest[key] = key_void; // key release should go nowhere (especially not to key_menu or key_game)
+ return;
+ }
+ }
// ignore binds while a video is played, let the video system handle the key event
if (cl_videoplaying)