Xonotic
|
#include <common/mutators/base.qh>
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 |
#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; }.
MUTATOR_HOOKABLE | ( | Menu_ConsoleCommand | , |
EV_Menu_ConsoleCommand | |||
) |
MUTATOR_HOOKABLE | ( | ConfigureDialogs | , |
EV_ConfigureDialogs | |||
) |
int cmd_argc |
Definition at line 13 of file events.qh.
Referenced by MUTATOR_HOOKFUNCTION().
string cmd_name |
Definition at line 12 of file events.qh.
Referenced by _getcommandkey(), and MUTATOR_HOOKFUNCTION().