Xonotic
events.qh File Reference
+ Include dependency graph for events.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EV_ConfigureDialogs(i, o)   /** main window entity */ i(entity, MUTATOR_ARGV_0_entity) \
 
#define EV_Menu_ConsoleCommand(i, o)
 Called when a menu command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, Menu_ConsoleCommand) { if (MUTATOR_RETURNVALUE) return false; // command was already handled if (cmd_name == "echocvar" && cmd_argc >= 2) { print(cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { print(substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }. More...
 

Functions

 MUTATOR_HOOKABLE (Menu_ConsoleCommand, EV_Menu_ConsoleCommand)
 
 MUTATOR_HOOKABLE (ConfigureDialogs, EV_ConfigureDialogs)
 

Variables

int cmd_argc
 
string cmd_name
 
string cmd_string
 

Macro Definition Documentation

◆ EV_ConfigureDialogs

#define EV_ConfigureDialogs (   i,
 
)    /** main window entity */ i(entity, MUTATOR_ARGV_0_entity) \

Definition at line 42 of file events.qh.

◆ EV_Menu_ConsoleCommand

#define EV_Menu_ConsoleCommand (   i,
 
)
Value:
i(string, cmd_name) \ i(int, cmd_argc) \ i(string, cmd_string) \

Called when a menu command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, Menu_ConsoleCommand) { if (MUTATOR_RETURNVALUE) return false; // command was already handled if (cmd_name == "echocvar" && cmd_argc >= 2) { print(cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { print(substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }.

Definition at line 35 of file events.qh.

Function Documentation

◆ MUTATOR_HOOKABLE() [1/2]

MUTATOR_HOOKABLE ( Menu_ConsoleCommand  ,
EV_Menu_ConsoleCommand   
)

◆ MUTATOR_HOOKABLE() [2/2]

MUTATOR_HOOKABLE ( ConfigureDialogs  ,
EV_ConfigureDialogs   
)

Variable Documentation

◆ cmd_argc

int cmd_argc

Definition at line 13 of file events.qh.

Referenced by MUTATOR_HOOKFUNCTION().

◆ cmd_name

string cmd_name

Definition at line 12 of file events.qh.

Referenced by _getcommandkey(), and MUTATOR_HOOKFUNCTION().

◆ cmd_string

string cmd_string

Definition at line 14 of file events.qh.