/* ================== Cmd_CompleteConcat ================== */ void Cmd_CompleteConcat( char *args, int argNum ) { // Skip char *p = Com_SkipTokens( args, argNum - 1, " " ); if( p > args ) Field_CompleteCommand( p, false, true ); }
/* ================== Cvar_CompleteCvarName ================== */ void Cvar_CompleteCvarName(char *args, int argNum) { if (argNum == 2) { // Skip "<cmd> " char *p = Com_SkipTokens(args, 1, " "); if (p > args) Field_CompleteCommand(p, qfalse, qtrue); } }
/* ==================== Cmd_CompleteJoyRemap ==================== */ static void Cmd_CompleteJoyUnmap( char *args, int argNum ) { if( argNum == 2 ) { // Skip "joyunmap " char *p = Com_SkipTokens( args, 1, " " ); // ZTM: TODO: add completion for (existing) joystick event? } }
/* ==================== Key_CompleteUnbind ==================== */ static void Key_CompleteUnbind( char *args, int argNum ) { if ( argNum == 2 ) { // Skip "unbind " char *p = Com_SkipTokens( args, 1, " " ); if ( p > args ) Field_CompleteKeyname(); } }
/* ================== Cmd_CompleteDelay ================== */ void Cmd_CompleteDelay( char *args, int argNum ) { if( argNum == 3 || argNum == 4 ) { // Skip "delay " char *p = Com_SkipTokens( args, 1, " " ); if( p > args ) Field_CompleteCommand( p, true, true ); } }
/* ================== Cvar_CompleteCvarName ================== */ void Cvar_CompleteCvarName( char *args, int argNum ) { // for auto-complete (copied from OpenJK) if( argNum == 2 ) { // Skip "<cmd> " char *p = Com_SkipTokens( args, 1, " " ); if( p > args ) Field_CompleteCommand( p, qfalse, qtrue, qtrue ); } }
/* ================== Cmd_CompleteIf ================== */ void Cmd_CompleteIf( char *args, int argNum ) { if( argNum == 5 || argNum == 6 ) { // Skip char *p = Com_SkipTokens( args, argNum - 1, " " ); if( p > args ) Field_CompleteCommand( p, qfalse, qtrue ); } }
/* ==================== Key_CompleteBind ==================== */ static void Key_CompleteBind( char *args, int argNum ) { char *p; if ( argNum == 2 ) { // Skip "bind " p = Com_SkipTokens( args, 1, " " ); if( p > args ) Field_CompleteKeyname( ); } else if ( argNum >= 3 ) { // Skip "bind <key> " p = Com_SkipTokens( args, 2, " " ); if ( p > args ) Field_CompleteCommand( p, qtrue, qtrue ); } }
/* ==================== Cmd_CompleteJoyRemap ==================== */ static void Cmd_CompleteJoyRemap( char *args, int argNum ) { char *p; if( argNum == 2 ) { // Skip "joyremap " //p = Com_SkipTokens( args, 1, " " ); // ZTM: TODO: add completion for (any) joystick event? } else if( argNum == 3 ) { // Skip "joyremap <event> " p = Com_SkipTokens( args, 2, " " ); if( p > args ) Field_CompleteKeyname( ); } }