/* * Key_DelegatePush */ keydest_t Key_DelegatePush( key_delegate_f key_del, key_char_delegate_f char_del ) { assert( key_delegate_stack_index < sizeof( key_delegate_stack ) / sizeof( key_delegate_f ) ); key_delegate_stack[key_delegate_stack_index].key_del = key_del; key_delegate_stack[key_delegate_stack_index].char_del = char_del; ++key_delegate_stack_index; if( key_delegate_stack_index == 1 ) { CL_SetOldKeyDest( cls.key_dest ); CL_SetKeyDest( key_delegate ); return cls.old_key_dest; } else return key_delegate; }
/* * Con_ToggleConsole_f */ void Con_ToggleConsole_f( void ) { SCR_EndLoadingPlaque(); // get rid of loading plaque if( cls.state == CA_GETTING_TICKET || cls.state == CA_CONNECTING || cls.state == CA_CONNECTED ) return; Con_ClearTyping(); Con_ClearNotify(); if( cls.key_dest == key_console ) { // close console CL_SetKeyDest( cls.old_key_dest ); } else { // open console CL_SetOldKeyDest( cls.key_dest ); CL_SetKeyDest( key_console ); } }