Skip to content

Commit

Permalink
Added cl_allowEnterCompletion cvar which will toggle autocompletion w…
Browse files Browse the repository at this point in the history
…hen pressing enter
  • Loading branch information
eternalcodes committed Aug 4, 2016
1 parent 267dc1b commit 37ac149
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion codemp/client/cl_keys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,8 @@ void Console_Key( int key ) {
g_consoleField.cursor--;
}

Field_AutoComplete(&g_consoleField, qtrue);
if (cl_allowEnterCompletion->integer)
Field_AutoComplete(&g_consoleField, qtrue);

// print executed command
Com_Printf( "%c%s\n", CONSOLE_PROMPT_CHAR, g_consoleField.buffer );
Expand Down
2 changes: 2 additions & 0 deletions codemp/client/cl_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ cvar_t *cl_motdString;

cvar_t *cl_allowDownload;
cvar_t *cl_allowAltEnter;
cvar_t *cl_allowEnterCompletion;
cvar_t *cl_conXOffset;
cvar_t *cl_inGameVideo;

Expand Down Expand Up @@ -3018,6 +3019,7 @@ void CL_Init( void ) {
cl_framerate = Cvar_Get ("cl_framerate", "0", CVAR_TEMP);
cl_allowDownload = Cvar_Get ("cl_allowDownload", "0", CVAR_ARCHIVE, "Allow downloading custom paks from server");
cl_allowAltEnter = Cvar_Get ("cl_allowAltEnter", "1", CVAR_ARCHIVE, "Enables use of ALT+ENTER keyboard combo to toggle fullscreen" );
cl_allowEnterCompletion = Cvar_Get("cl_allowEnterCompletion", "1", CVAR_ARCHIVE, "Enables autocomplete when pressing enter");

cl_autolodscale = Cvar_Get( "cl_autolodscale", "1", CVAR_ARCHIVE );

Expand Down
1 change: 1 addition & 0 deletions codemp/client/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ extern cvar_t *cl_activeAction;

extern cvar_t *cl_allowDownload;
extern cvar_t *cl_allowAltEnter;
extern cvar_t *cl_allowEnterCompletion;
extern cvar_t *cl_conXOffset;
extern cvar_t *cl_inGameVideo;

Expand Down

0 comments on commit 37ac149

Please sign in to comment.