mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 08:41:11 +00:00
Fix the API for inputline->enter().
Pass the inputline object rather than the input text, allowing access to both user_data and the input text.
This commit is contained in:
parent
30bd1c0134
commit
c8e1d7b45a
4 changed files with 25 additions and 8 deletions
|
@ -326,8 +326,9 @@ cl_conmode_f (cvar_t *var)
|
|||
}
|
||||
|
||||
static void
|
||||
C_Say (const char *line)
|
||||
C_Say (inputline_t *il)
|
||||
{
|
||||
const char *line = il->line;
|
||||
if (!*line)
|
||||
return;
|
||||
|
||||
|
@ -339,8 +340,9 @@ C_Say (const char *line)
|
|||
}
|
||||
|
||||
static void
|
||||
C_SayTeam (const char *line)
|
||||
C_SayTeam (inputline_t *il)
|
||||
{
|
||||
const char *line = il->line;
|
||||
if (!*line)
|
||||
return;
|
||||
|
||||
|
@ -797,6 +799,12 @@ C_GIB_HUD_Disable_f (void)
|
|||
hud_view->visible = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
exec_line (inputline_t *il)
|
||||
{
|
||||
Con_ExecLine (il->line);
|
||||
}
|
||||
|
||||
static void
|
||||
C_Init (void)
|
||||
{
|
||||
|
@ -875,7 +883,7 @@ C_Init (void)
|
|||
|
||||
input_line = Con_CreateInputLine (32, MAXCMDLINE, ']');
|
||||
input_line->complete = Con_BasicCompleteCommandLine;
|
||||
input_line->enter = Con_ExecLine;
|
||||
input_line->enter = exec_line;
|
||||
input_line->width = con_linewidth;
|
||||
input_line->user_data = 0;
|
||||
input_line->draw = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue