* Move command argument completion from being hard coded to being associated
with the individual commands to be completed
This commit is contained in:
parent
47ee177430
commit
130c0c6575
8 changed files with 195 additions and 89 deletions
|
@ -421,8 +421,14 @@ void Cmd_AddCommand( const char *cmd_name, xcommand_t function );
|
|||
|
||||
void Cmd_RemoveCommand( const char *cmd_name );
|
||||
|
||||
typedef void (*completionFunc_t)( char *args, int argNum );
|
||||
|
||||
void Cmd_CommandCompletion( void(*callback)(const char *s) );
|
||||
// callback with each valid string
|
||||
void Cmd_SetCommandCompletionFunc( const char *command,
|
||||
completionFunc_t complete );
|
||||
void Cmd_CompleteArgument( const char *command, char *args, int argNum );
|
||||
void Cmd_CompleteCfgName( char *args, int argNum );
|
||||
|
||||
int Cmd_Argc (void);
|
||||
char *Cmd_Argv (int arg);
|
||||
|
@ -533,6 +539,8 @@ void Cvar_CheckRange( cvar_t *cv, float minVal, float maxVal, qboolean shouldBeI
|
|||
|
||||
void Cvar_Restart_f( void );
|
||||
|
||||
void Cvar_CompleteCvarName( char *args, int argNum );
|
||||
|
||||
extern int cvar_modifiedFlags;
|
||||
// whenever a cvar is modifed, its flags will be OR'd into this, so
|
||||
// a single check can determine if any CVAR_USERINFO, CVAR_SERVERINFO,
|
||||
|
@ -712,6 +720,11 @@ typedef struct {
|
|||
|
||||
void Field_Clear( field_t *edit );
|
||||
void Field_AutoComplete( field_t *edit );
|
||||
void Field_CompleteKeyname( void );
|
||||
void Field_CompleteFilename( const char *dir,
|
||||
const char *ext, qboolean stripExt );
|
||||
void Field_CompleteCommand( char *cmd,
|
||||
qboolean doCommands, qboolean doCvars );
|
||||
|
||||
/*
|
||||
==============================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue