cl_menu.c
Go to the documentation of this file.00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "client.h"
00027 #include "cl_menu.h"
00028 #include "ui/ui_main.h"
00029 #include "ui/ui_nodes.h"
00030 #include "ui/ui_popup.h"
00031 #include "ui/node/ui_node_abstractnode.h"
00032
00033 static inline void CLMN_AddBindings (linkedList_t **list, char **bindings)
00034 {
00035 int i;
00036 for (i = K_FIRST_KEY; i < K_LAST_KEY; i++)
00037 if (bindings[i] && bindings[i][0] != '\0')
00038 LIST_AddString(list, va("%s\t%s", Key_KeynumToString(i), Cmd_GetCommandDesc(bindings[i])));
00039 }
00040
00044 static void CLMN_InitKeyList_f (void)
00045 {
00046 linkedList_t *list = NULL;
00047
00048 CLMN_AddBindings(&list, keyBindings);
00049 CLMN_AddBindings(&list, menuKeyBindings);
00050 CLMN_AddBindings(&list, battleKeyBindings);
00051
00052 UI_RegisterLinkedListText(TEXT_LIST, list);
00053 }
00054
00061 void CLMN_InitStartup (void)
00062 {
00063
00064 Cmd_AddCommand("mn_init_keylist", CLMN_InitKeyList_f, NULL);
00065
00066 UI_Init();
00067 }