]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/quickmenu
authorterencehill <piuntn@gmail.com>
Tue, 19 Mar 2013 16:34:21 +0000 (17:34 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 19 Mar 2013 16:34:21 +0000 (17:34 +0100)
Conflicts:
qcsrc/client/View.qc
qcsrc/client/autocvars.qh

22 files changed:
_hud_common.cfg
_hud_descriptions.cfg
defaultXonotic.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
keybinds.txt
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/command/cl_cmd.qc
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/hud_config.qc
qcsrc/common/constants.qh
qcsrc/common/util.qh
qcsrc/menu/classes.c
qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.c [new file with mode: 0644]
qcsrc/menu/xonotic/mainwindow.c
quickmenu.txt [new file with mode: 0644]

index ca90bc9da204f14dc8af7cf536336699cb230363..4e5b7328f03d078c371b9076f662e4fde428e129 100644 (file)
@@ -37,6 +37,8 @@ seta hud_panel_engineinfo_framecounter_exponentialmovingaverage 1 "use an averag
 seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_new_weight 0.1 "weight of latest data point"
 seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_instantupdate_change_threshold 0.5 "threshold for fps change when to update instantly, to make big fps changes update faster"
 
+seta hud_panel_quickmenu_file quickmenu.txt "load the quick menu from this file"
+
 // hud panel aliases
 alias hud_panel_radar_rotate "toggle hud_panel_radar_rotation 0 1 2 3 4"
 alias +hud_panel_radar_maximized "cl_cmd hud radar 1"
index ea7552a2a6566f7fb0631578327770a534ce4a12..6ca17d73fa09e58d115337f87a0aeaedf2dec7af 100644 (file)
@@ -294,3 +294,14 @@ seta hud_panel_centerprint_fade_subsequent_passtwo "" "division factor for the s
 seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "" "minimum factor that the second pass can fade to"
 seta hud_panel_centerprint_fade_subsequent_minfontsize "" "minimum factor for the font size from the subsequent fading effects"
 seta hud_panel_centerprint_fade_minfontsize "" "minimum factor for the font size from the fading in/out effects"
+
+seta hud_panel_quickmenu "" "enable/disable this panel"
+seta hud_panel_quickmenu_pos "" "position of this base of the panel"
+seta hud_panel_quickmenu_size "" "size of this panel"
+seta hud_panel_quickmenu_bg "" "if set to something else than \"\" = override default background"
+seta hud_panel_quickmenu_bg_color "" "if set to something else than \"\" = override default panel background color"
+seta hud_panel_quickmenu_bg_color_team "" "override panel color with team color in team based games"
+seta hud_panel_quickmenu_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
+seta hud_panel_quickmenu_bg_border "" "if set to something else than \"\" = override default size of border around the background"
+seta hud_panel_quickmenu_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
+seta hud_panel_quickmenu_align "text alignment: 0 left, 0.5 center, 1 right"
index e1b16f435c8644a23202f4a8a1d6d1bfaf9bbcb3..6ac19ae4a4510101e1ee97d91614ad7cd4e77274 100644 (file)
@@ -682,6 +682,8 @@ bind F11 disconnect
 bind F12 screenshot
 bind F4 ready
 bind ALT +showaccuracy
+alias quickmenu "cl_cmd hud quickmenu"
+bind b quickmenu
 
 // Gamepad defaults. Tested with Logitech Rumblepad 2, I hope similar ones works as well.
 bind JOY1 "+crouch"
index bb0c97e0998af1f8a4d88cf7f3aef2e236f9e52b..c4e2c8e3963a6b049ed384e60332188dbfcadd64 100644 (file)
@@ -24,7 +24,7 @@ seta hud_progressbar_speed_color "1 0.75 0"
 seta hud_progressbar_acceleration_color "0.5 0.75 1" 
 seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5" 
 
-seta _hud_panelorder "15 12 9 10 5 6 14 0 7 4 11 2 1 3 8 13 16 "
+seta _hud_panelorder "15 12 9 10 5 6 14 0 7 4 11 2 1 3 8 13 16 17 "
 
 seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
@@ -293,4 +293,15 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
 seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
 seta hud_panel_centerprint_fade_minfontsize "0"
 
+seta hud_panel_quickmenu 1
+seta hud_panel_quickmenu_pos "0.000000 0.430000"
+seta hud_panel_quickmenu_size "0.210000 0.250000"
+seta hud_panel_quickmenu_bg ""
+seta hud_panel_quickmenu_bg_color ""
+seta hud_panel_quickmenu_bg_color_team ""
+seta hud_panel_quickmenu_bg_alpha ""
+seta hud_panel_quickmenu_bg_border ""
+seta hud_panel_quickmenu_bg_padding ""
+seta hud_panel_quickmenu_align "0"
+
 menu_sync
index 775ddaf8f16f3779f77ace00f834c7c4015a418b..3f57bc2199b53ee2259712e453095f2d09e99c40 100644 (file)
@@ -24,7 +24,7 @@ seta hud_progressbar_speed_color "1 0.75 0"
 seta hud_progressbar_acceleration_color "0.5 0.75 1" 
 seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5" 
 
-seta _hud_panelorder "10 3 0 14 6 9 13 4 1 2 11 12 7 5 8 15 16 "
+seta _hud_panelorder "10 3 0 14 6 9 13 4 1 2 11 12 7 5 8 15 16 17 "
 
 seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
@@ -293,4 +293,15 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
 seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
 seta hud_panel_centerprint_fade_minfontsize "0"
 
+seta hud_panel_quickmenu 1
+seta hud_panel_quickmenu_pos "0.000000 0.430000"
+seta hud_panel_quickmenu_size "0.210000 0.250000"
+seta hud_panel_quickmenu_bg ""
+seta hud_panel_quickmenu_bg_color ""
+seta hud_panel_quickmenu_bg_color_team ""
+seta hud_panel_quickmenu_bg_alpha ""
+seta hud_panel_quickmenu_bg_border ""
+seta hud_panel_quickmenu_bg_padding ""
+seta hud_panel_quickmenu_align "0"
+
 menu_sync
index b7a208dbdbccb0a924fe50bcd37f9b7e460685c7..1d178af6d8aa03fbc9fa9d670b365cfee77a6a86 100644 (file)
@@ -24,7 +24,7 @@ seta hud_progressbar_speed_color "1 0.75 0"
 seta hud_progressbar_acceleration_color "0.5 0.75 1" 
 seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5" 
 
-seta _hud_panelorder "15 3 1 2 11 10 0 14 6 9 13 4 12 7 5 8 16 "
+seta _hud_panelorder "15 3 1 2 11 10 0 14 6 9 13 4 12 7 5 8 16 17 "
 
 seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
@@ -293,4 +293,15 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
 seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
 seta hud_panel_centerprint_fade_minfontsize "0"
 
+seta hud_panel_quickmenu 1
+seta hud_panel_quickmenu_pos "0.000000 0.430000"
+seta hud_panel_quickmenu_size "0.210000 0.250000"
+seta hud_panel_quickmenu_bg ""
+seta hud_panel_quickmenu_bg_color ""
+seta hud_panel_quickmenu_bg_color_team ""
+seta hud_panel_quickmenu_bg_alpha ""
+seta hud_panel_quickmenu_bg_border ""
+seta hud_panel_quickmenu_bg_padding ""
+seta hud_panel_quickmenu_align "0"
+
 menu_sync
index 2e718b288b240dacd582d711835b0ba3ed16e14c..ae82804505c1864af35c7b039eb12f80d985b3c5 100644 (file)
@@ -24,7 +24,7 @@ seta hud_progressbar_speed_color "1 0.75 0"
 seta hud_progressbar_acceleration_color "0.5 0.75 1" 
 seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5" 
 
-seta _hud_panelorder "15 10 9 6 8 14 5 0 4 13 2 7 1 3 11 12 16 "
+seta _hud_panelorder "15 10 9 6 8 14 5 0 4 13 2 7 1 3 11 12 16 17 "
 
 seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.010000"
@@ -293,4 +293,15 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
 seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
 seta hud_panel_centerprint_fade_minfontsize "0"
 
+seta hud_panel_quickmenu 1
+seta hud_panel_quickmenu_pos "0.700000 0.460000"
+seta hud_panel_quickmenu_size "0.210000 0.250000"
+seta hud_panel_quickmenu_bg ""
+seta hud_panel_quickmenu_bg_color ""
+seta hud_panel_quickmenu_bg_color_team ""
+seta hud_panel_quickmenu_bg_alpha ""
+seta hud_panel_quickmenu_bg_border ""
+seta hud_panel_quickmenu_bg_padding ""
+seta hud_panel_quickmenu_align "1"
+
 menu_sync
index d4e71d876268cac6b7cccd8e60b9bb7573563ca0..5a5242bffb4bcce8be3e85e9e2c4ccb4ba4e6c4f 100644 (file)
@@ -24,7 +24,7 @@ seta hud_progressbar_speed_color "1 0.75 0"
 seta hud_progressbar_acceleration_color "0.5 0.75 1" 
 seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5" 
 
-seta _hud_panelorder "15 0 11 8 5 6 14 9 13 7 2 3 1 10 12 4 16 "
+seta _hud_panelorder "15 0 11 8 5 6 14 9 13 7 2 3 1 10 12 4 16 17 "
 
 seta hud_configure_grid "1"
 seta hud_configure_grid_xsize "0.01"
@@ -293,4 +293,15 @@ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
 seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
 seta hud_panel_centerprint_fade_minfontsize "0"
 
+seta hud_panel_quickmenu 1
+seta hud_panel_quickmenu_pos "0.000000 0.380000"
+seta hud_panel_quickmenu_size "0.210000 0.250000"
+seta hud_panel_quickmenu_bg ""
+seta hud_panel_quickmenu_bg_color ""
+seta hud_panel_quickmenu_bg_color_team ""
+seta hud_panel_quickmenu_bg_alpha ""
+seta hud_panel_quickmenu_bg_border ""
+seta hud_panel_quickmenu_bg_padding ""
+seta hud_panel_quickmenu_align "0"
+
 menu_sync
index 22f021434183f8611ae0307dc1b2314874ef6292..6bec67ce51c48d496c7c6b03bdf7fe7b8b33aca1 100644 (file)
@@ -44,6 +44,7 @@
 "ready"                                 "ready"
 ""                                      ""
 ""                                      "Client"
+"quickmenu"                             "quick menu"
 "+show_info"                            "server info"
 "toggleconsole"                         "enter console"
 "disconnect"                            "disconnect"
index f8b6e9cf08e1fa55b1ab3903966584e60b458fa1..74b51b0f79c61fedeccdd6148c7c5a6dff9883b9 100644 (file)
@@ -399,6 +399,9 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary)
        if (HUD_Panel_InputEvent(bInputType, nPrimary, nSecondary))
                return true;
 
+       if (HUD_QuickMenu_InputEvent(bInputType, nPrimary, nSecondary))
+               return true;
+
        if (MapVote_InputEvent(bInputType, nPrimary, nSecondary))
                return true;
 
index 3362ce42231193210b22b6ad0fe52f5cf8cbd1bd..dd9bfa8275ea1358608c15bcf75b8d4aed3ebfa2 100644 (file)
@@ -501,7 +501,7 @@ void CSQC_UpdateView(float w, float h)
        }
 
        // do lockview after event chase camera so that it still applies whenever necessary.
-       if(autocvar_cl_lockview || (!autocvar_hud_cursormode && (autocvar__hud_configure && spectatee_status <= 0 || intermission > 1)))
+       if(autocvar_cl_lockview || (!autocvar_hud_cursormode && (autocvar__hud_configure && spectatee_status <= 0 || intermission > 1 || HUD_QuickMenu_IsOpened())))
        {
                setproperty(VF_ORIGIN, freeze_org);
                setproperty(VF_ANGLES, freeze_ang);
@@ -1480,23 +1480,25 @@ void CSQC_UpdateView(float w, float h)
 
        if(autocvar__hud_configure)
                HUD_Panel_Mouse();
-    
-    if(hud && !intermission)
-    {        
-        if(hud == HUD_SPIDERBOT)
-            CSQC_SPIDER_HUD();
-        else if(hud == HUD_WAKIZASHI)
-            CSQC_WAKIZASHI_HUD();
-        else if(hud == HUD_RAPTOR)
-            CSQC_RAPTOR_HUD();
-        else if(hud == HUD_BUMBLEBEE)
-            CSQC_BUMBLE_HUD();
-        else if(hud == HUD_BUMBLEBEE_GUN)
-            CSQC_BUMBLE_GUN_HUD();
-    }
-       
+       else if (HUD_QuickMenu_IsOpened())
+               HUD_QuickMenu_Mouse();
+
+       if(hud && !intermission)
+       {
+               if(hud == HUD_SPIDERBOT)
+                       CSQC_SPIDER_HUD();
+               else if(hud == HUD_WAKIZASHI)
+                       CSQC_WAKIZASHI_HUD();
+               else if(hud == HUD_RAPTOR)
+                       CSQC_RAPTOR_HUD();
+               else if(hud == HUD_BUMBLEBEE)
+                       CSQC_BUMBLE_HUD();
+               else if(hud == HUD_BUMBLEBEE_GUN)
+                       CSQC_BUMBLE_GUN_HUD();
+       }
+
        cl_notice_run();
-       
+
        // let's reset the view back to normal for the end
        setproperty(VF_MIN, '0 0 0');
        setproperty(VF_SIZE, '1 0 0' * w + '0 1 0' * h);
index ba6abadc018868762228d1875b5180244fe9ce2a..5532736d6afb06491416e7079adcf4bd7dbc9ae4 100644 (file)
@@ -284,6 +284,7 @@ float autocvar_hud_panel_powerups_text;
 float autocvar_hud_panel_pressedkeys;
 float autocvar_hud_panel_pressedkeys_aspect;
 float autocvar_hud_panel_pressedkeys_attack;
+string autocvar_hud_panel_quickmenu_file;
 float autocvar_hud_panel_racetimer;
 float autocvar_hud_panel_radar;
 float autocvar_hud_panel_radar_foreground_alpha;
@@ -327,6 +328,8 @@ float autocvar_hud_panel_weapons_timeout_fadebgmin;
 float autocvar_hud_panel_weapons_timeout_fadefgmin;
 var float autocvar_hud_panel_weapons_timeout_speed_in = 0.25; 
 var float autocvar_hud_panel_weapons_timeout_speed_out = 0.75;
+float autocvar_hud_panel_quickmenu;
+float autocvar_hud_panel_quickmenu_align;
 float autocvar_hud_progressbar_alpha;
 float autocvar_hud_showbinds;
 float autocvar_hud_showbinds_limit;
index acac8b3121574d22a2ec706a9f78849b5a404712..714ddc69c0523ab52ec00c1500ad8df4aaa064ba 100644 (file)
@@ -186,7 +186,17 @@ void LocalCommand_hud(float request, float argc)
                                        cvar_set("_hud_configure", ftos(!autocvar__hud_configure));
                                        return;
                                }
-                               
+
+                               case "quickmenu":
+                               {
+                                       if(argc == 2 && HUD_QuickMenu_IsOpened())
+                                               HUD_QuickMenu_Close();
+                                       else
+                                               if (HUD_QuickMenu_Buffer_Init())
+                                                       HUD_QuickMenu_Open("", 0);
+                                       return;
+                               }
+
                                case "save":
                                {
                                        if(argv(2))
@@ -199,10 +209,10 @@ void LocalCommand_hud(float request, float argc)
                                                break; // go to usage, we're missing the paramater needed here.
                                        }
                                }
-                               
+
                                case "scoreboard_columns_set":
                                {
-                                       Cmd_HUD_SetFields(argc); 
+                                       Cmd_HUD_SetFields(argc);
                                        return;
                                }
 
@@ -211,7 +221,7 @@ void LocalCommand_hud(float request, float argc)
                                        Cmd_HUD_Help();
                                        return;
                                }
-                               
+
                                case "radar":
                                {
                                        if(argv(2))
@@ -222,7 +232,7 @@ void LocalCommand_hud(float request, float argc)
                                }
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2hud^7\n");
                case CMD_REQUEST_USAGE:
index bec60a5e80a0deec87e6d7cbcb7d0d28f52f9e0b..c4f81d3d47bfe059242a7f5ffbd1f31d154b665e 100644 (file)
@@ -4358,6 +4358,441 @@ void HUD_CenterPrint (void)
        }
 }
 
+
+// QUICKMENU_MAXLINES must be <= 10
+#define QUICKMENU_MAXLINES 10
+#define QUICKMENU_MAXENTRIES 256
+string QuickMenu_Command[QUICKMENU_MAXLINES];
+string QuickMenu_Description[QUICKMENU_MAXLINES];
+float QuickMenu_CurrentPage;
+float QuickMenu_IsLastPage;
+var float QuickMenu_Buffer = -1;
+float QuickMenu_Buffer_Size;
+float QuickMenu_Buffer_Index;
+string QuickMenu_CurrentSubMenu;
+float QuickMenu_CurrentPage_FirstEntry;
+var float QuickMenu_Entries;
+void HUD_QuickMenu_load_entry(float i, string s, string s1)
+{
+       //print(sprintf("^xc80 entry %d: %s, %s\n", i, s, s1));
+       if (QuickMenu_Description[i])
+               strunzone(QuickMenu_Description[i]);
+       QuickMenu_Description[i] = strzone(s);
+       if (QuickMenu_Command[i])
+               strunzone(QuickMenu_Command[i]);
+       QuickMenu_Command[i] = strzone(s1);
+}
+void HUD_QuickMenu_clear_entry(float i)
+{
+       if (QuickMenu_Description[i])
+               strunzone(QuickMenu_Description[i]);
+       QuickMenu_Description[i] = string_null;
+       if (QuickMenu_Command[i])
+               strunzone(QuickMenu_Command[i]);
+       QuickMenu_Command[i] = string_null;
+}
+
+float HUD_QuickMenu_Buffer_Init()
+{
+       float fh, i;
+       string s;
+       fh = fopen(autocvar_hud_panel_quickmenu_file, FILE_READ);
+       if(fh < 0)
+       {
+               print(sprintf(_("Error: Couldn't open file %s!\n"), autocvar_hud_panel_quickmenu_file));
+               return false;
+       }
+
+       QuickMenu_Buffer = buf_create();
+       if (QuickMenu_Buffer < 0)
+       {
+               fclose(fh);
+               return false;
+       }
+
+       i = 0;
+       while((s = fgets(fh)) && i < QUICKMENU_MAXENTRIES)
+       {
+               // first skip invalid entries, so we don't check them anymore
+               float argc;
+               argc = tokenize_console(s);
+               if(argc == 0 || argc > 2)
+                       continue;
+
+               bufstr_set(QuickMenu_Buffer, i, s);
+               ++i;
+       }
+       QuickMenu_Buffer_Size = i;
+
+       if (QuickMenu_Buffer_Size <= 0)
+       {
+               buf_del(QuickMenu_Buffer);
+               QuickMenu_Buffer = -1;
+       }
+       fclose(fh);
+       return true;
+}
+void HUD_QuickMenu_Buffer_Close()
+{
+       if (QuickMenu_Buffer >= 0)
+       {
+               buf_del(QuickMenu_Buffer);
+               QuickMenu_Buffer = -1;
+               QuickMenu_Buffer_Size = 0;
+       }
+}
+void HUD_QuickMenu_Close()
+{
+       if (QuickMenu_CurrentSubMenu)
+               strunzone(QuickMenu_CurrentSubMenu);
+       QuickMenu_CurrentSubMenu = string_null;
+       float i;
+       for (i = 0; i < QUICKMENU_MAXLINES; ++i)
+               HUD_QuickMenu_clear_entry(i);
+       QuickMenu_Entries = 0;
+       hud_panel_quickmenu = 0;
+       mouseClicked = 0;
+       prevMouseClicked = 0;
+       HUD_QuickMenu_Buffer_Close();
+}
+
+// It assumes submenu open tag is already detected
+void HUD_QuickMenu_skip_submenu(string submenu)
+{
+       string s, z_submenu;
+       z_submenu = strzone(submenu);
+       for(++QuickMenu_Buffer_Index ; QuickMenu_Buffer_Index < QuickMenu_Buffer_Size; ++QuickMenu_Buffer_Index)
+       {
+               s = bufstr_get(QuickMenu_Buffer, QuickMenu_Buffer_Index);
+               float argc;
+               argc = tokenize_console(s);
+               if(argc == 2)
+                       continue;
+               if (argv(0) == "")
+                       continue;
+               if (argv(0) == z_submenu) // submenu end
+                       break;
+               HUD_QuickMenu_skip_submenu(argv(0));
+       }
+       strunzone(z_submenu);
+}
+
+
+float HUD_QuickMenu_IsOpened()
+{
+       return (QuickMenu_Entries > 0);
+}
+
+// new_page 0 means page 0, new_page != 0 means next page
+float QuickMenu_Buffer_Index_Prev;
+void HUD_QuickMenu_Open(string target_submenu, float new_page)
+{
+       float total, i;
+       string s, z_submenu;
+
+       if (new_page == 0)
+               QuickMenu_CurrentPage = 0;
+       else
+               ++QuickMenu_CurrentPage;
+       QuickMenu_CurrentPage_FirstEntry = QuickMenu_CurrentPage * (QUICKMENU_MAXLINES - 2);
+
+       z_submenu = strzone(target_submenu);
+       if (QuickMenu_CurrentSubMenu)
+               strunzone(QuickMenu_CurrentSubMenu);
+       QuickMenu_CurrentSubMenu = strzone(z_submenu);
+
+       QuickMenu_IsLastPage = TRUE;
+       QuickMenu_Entries = 0;
+
+       QuickMenu_Buffer_Index = 0;
+       if (z_submenu != "")
+       {
+               // skip everything until the submenu open tag is found
+               for( ; QuickMenu_Buffer_Index < QuickMenu_Buffer_Size; ++QuickMenu_Buffer_Index)
+               {
+                       s = bufstr_get(QuickMenu_Buffer, QuickMenu_Buffer_Index);
+                       if (tokenize_console(s) == 1 && argv(0) == z_submenu)
+                       {
+                               // print(sprintf("^3 beginning of %s\n", z_submenu));
+                               ++QuickMenu_Buffer_Index;
+                               break;
+                       }
+                       // print(sprintf("^1 skipping %s\n", s));
+               }
+       }
+       for( ; QuickMenu_Buffer_Index < QuickMenu_Buffer_Size; ++QuickMenu_Buffer_Index)
+       {
+               s = bufstr_get(QuickMenu_Buffer, QuickMenu_Buffer_Index);
+               float argc;
+               argc = tokenize_console(s);
+
+               if (z_submenu != "" && z_submenu == argv(0))
+               {
+                       // print(sprintf("^3 end of %s\n", z_submenu));
+                       break;
+               }
+
+               if (total - QuickMenu_CurrentPage_FirstEntry >= 0)
+               {
+                       ++QuickMenu_Entries;
+                       if(QuickMenu_Entries == QUICKMENU_MAXLINES - 2)
+                               QuickMenu_Buffer_Index_Prev = QuickMenu_Buffer_Index;
+                       else if(QuickMenu_Entries == QUICKMENU_MAXLINES)
+                       {
+                               HUD_QuickMenu_clear_entry(QUICKMENU_MAXLINES - 1);
+                               QuickMenu_Buffer_Index = QuickMenu_Buffer_Index_Prev;
+                               QuickMenu_IsLastPage = FALSE;
+                               break;
+                       }
+               }
+
+               // NOTE: entries are loaded starting from 1, not from 0
+               if (argc == 1 && argv(0) != "") // submenu
+               {
+                       if (total - QuickMenu_CurrentPage_FirstEntry >= 0)
+                               HUD_QuickMenu_load_entry(QuickMenu_Entries, argv(0), "");
+                       HUD_QuickMenu_skip_submenu(argv(0));
+               }
+               else if (total - QuickMenu_CurrentPage_FirstEntry >= 0)
+                       HUD_QuickMenu_load_entry(QuickMenu_Entries, argv(0), argv(1));
+
+               ++total;
+       }
+       strunzone(z_submenu);
+       if (QuickMenu_Entries == 0)
+               HUD_QuickMenu_Close();
+       else
+               hud_panel_quickmenu = 1;
+}
+
+float HUD_QuickMenu_ActionForNumber(float num)
+{
+       if (!QuickMenu_IsLastPage)
+       {
+               if (num < 0 || num >= QUICKMENU_MAXLINES)
+                       return 0;
+               if (num == QUICKMENU_MAXLINES - 1)
+                       return 0;
+               if (num == 0)
+               {
+                       HUD_QuickMenu_Open(QuickMenu_CurrentSubMenu, +1);
+                       return 0;
+               }
+       } else if (num <= 0 || num > QuickMenu_Entries)
+               return 0;
+
+       if (QuickMenu_Command[num] != "")
+       {
+               localcmd(strcat("\n", QuickMenu_Command[num], "\n"));
+               return 1;
+       }
+       if (QuickMenu_Description[num] != "")
+               HUD_QuickMenu_Open(QuickMenu_Description[num], 0);
+       return 0;
+}
+float HUD_QuickMenu_InputEvent(float bInputType, float nPrimary, float nSecondary)
+{
+       string s;
+
+       // we only care for keyboard events
+       if(bInputType != 0 && bInputType != 1)
+               return false;
+
+       if(!HUD_QuickMenu_IsOpened() || autocvar__hud_configure)
+               return false;
+
+       // allow console bind to work
+       string con_keys;
+       float keys;
+       con_keys = findkeysforcommand("toggleconsole", 0);
+       keys = tokenize(con_keys); // findkeysforcommand returns data for this
+
+       float hit_con_bind, i;
+       for (i = 0; i < keys; ++i)
+       {
+               if(nPrimary == stof(argv(i)))
+                       hit_con_bind = 1;
+       }
+
+       if(bInputType == 0) {
+               if(nPrimary == K_ALT) hudShiftState |= S_ALT;
+               if(nPrimary == K_CTRL) hudShiftState |= S_CTRL;
+               if(nPrimary == K_SHIFT) hudShiftState |= S_SHIFT;
+       }
+       else if(bInputType == 1) {
+               if(nPrimary == K_ALT) hudShiftState -= (hudShiftState & S_ALT);
+               if(nPrimary == K_CTRL) hudShiftState -= (hudShiftState & S_CTRL);
+               if(nPrimary == K_SHIFT) hudShiftState -= (hudShiftState & S_SHIFT);
+       }
+
+       if(nPrimary == K_ESCAPE)
+       {
+               if (bInputType == 1)
+                       return true;
+               HUD_QuickMenu_Close();
+       }
+       else if(nPrimary >= '0' && nPrimary <= '9')
+       {
+               if (bInputType == 1)
+                       return true;
+               HUD_QuickMenu_ActionForNumber(stof(chr2str(nPrimary)));
+       }
+       if(nPrimary == K_MOUSE1)
+       {
+               if(bInputType == 0) // key pressed
+                       mouseClicked |= S_MOUSE1;
+               else if(bInputType == 1) // key released
+                       mouseClicked -= (mouseClicked & S_MOUSE1);
+       }
+       else if(nPrimary == K_MOUSE2)
+       {
+               if(bInputType == 0) // key pressed
+                       mouseClicked |= S_MOUSE2;
+               else if(bInputType == 1) // key released
+                       mouseClicked -= (mouseClicked & S_MOUSE2);
+       }
+       else if(hit_con_bind)
+               return false;
+
+       return true;
+}
+void HUD_QuickMenu_Mouse()
+{
+       if(!mouseClicked)
+       if(prevMouseClicked & S_MOUSE2)
+       {
+               HUD_QuickMenu_Close();
+               return;
+       }
+
+       mousepos = mousepos + getmousepos() * autocvar_menu_mouse_speed;
+
+       mousepos_x = bound(0, mousepos_x, vid_conwidth);
+       mousepos_y = bound(0, mousepos_y, vid_conheight);
+
+       HUD_Panel_UpdatePosSize(quickmenu)
+
+       float first_entry_pos, entries_height;
+       vector fontsize;
+       fontsize = '1 1 0' * (panel_size_y / QUICKMENU_MAXLINES);
+       first_entry_pos = panel_pos_y + ((QUICKMENU_MAXLINES - QuickMenu_Entries) * fontsize_y) / 2;
+       entries_height = panel_size_y - ((QUICKMENU_MAXLINES - QuickMenu_Entries) * fontsize_y);
+
+       if (mousepos_x >= panel_pos_x && mousepos_y >= first_entry_pos && mousepos_x <= panel_pos_x + panel_size_x && mousepos_y <= first_entry_pos + entries_height)
+       {
+               float entry_num;
+               entry_num = floor((mousepos_y - first_entry_pos) / fontsize_y);
+               if (QuickMenu_IsLastPage || entry_num != QUICKMENU_MAXLINES - 2)
+               {
+                       panel_pos_y = first_entry_pos + entry_num * fontsize_y;
+                       vector color;
+                       if(mouseClicked & S_MOUSE1)
+                               color = '0.5 1 0.5';
+                       else if(hudShiftState & S_CTRL)
+                               color = '1 1 0.3';
+                       else
+                               color = '1 1 1';
+                       drawfill(panel_pos, eX * panel_size_x + eY * fontsize_y, color, .2, DRAWFLAG_NORMAL);
+
+                       if(!mouseClicked && prevMouseClicked & S_MOUSE1)
+                       {
+                               float f;
+                               if (entry_num < QUICKMENU_MAXLINES - 1)
+                                       f = HUD_QuickMenu_ActionForNumber(entry_num + 1);
+                               else
+                                       f = HUD_QuickMenu_ActionForNumber(0);
+                               if(f && !(hudShiftState & S_CTRL))
+                                       HUD_QuickMenu_Close();
+                       }
+               }
+       }
+
+       const vector cursorsize = '32 32 0';
+       drawpic(mousepos, strcat("gfx/menu/", autocvar_menu_skin, "/cursor.tga"), cursorsize, '1 1 1', 0.8, DRAWFLAG_NORMAL);
+
+       prevMouseClicked = mouseClicked;
+}
+void HUD_QuickMenu_DrawEntry(vector pos, string s, vector fontsize)
+{
+       string entry;
+       float offset;
+       entry = textShortenToWidth(s, panel_size_x, fontsize, stringwidth_colors);
+       if (autocvar_hud_panel_quickmenu_align > 0)
+       {
+               offset = (panel_size_x - stringwidth_colors(entry, fontsize)) * min(autocvar_hud_panel_quickmenu_align, 1);
+               drawcolorcodedstring(pos + eX * offset, entry, fontsize, panel_fg_alpha, DRAWFLAG_ADDITIVE);
+       }
+       else
+               drawcolorcodedstring(pos, entry, fontsize, panel_fg_alpha, DRAWFLAG_ADDITIVE);
+}
+void HUD_QuickMenu(void)
+{
+       if(!autocvar__hud_configure)
+       {
+               if (hud_configure_prev && hud_configure_prev != -1)
+                       HUD_QuickMenu_Close();
+
+               if(!hud_draw_maximized) return;
+               //if(!autocvar_hud_panel_quickmenu) return; // autocvar exists only for conformity with other panels
+               if(!hud_panel_quickmenu) return;
+       }
+       else
+       {
+               if(!HUD_QuickMenu_IsOpened())
+               {
+                       QuickMenu_Entries = 1;
+                       HUD_QuickMenu_load_entry(QuickMenu_Entries, sprintf(_("Submenu%d"), QuickMenu_Entries), "");
+                       ++QuickMenu_Entries;
+                       HUD_QuickMenu_load_entry(QuickMenu_Entries, sprintf(_("Submenu%d"), QuickMenu_Entries), "");
+                       ++QuickMenu_Entries;
+                       // although real command doesn't matter here, it must not be empty
+                       // otherwise the entry is displayed like a submenu
+                       for (; QuickMenu_Entries < QUICKMENU_MAXLINES - 1; ++QuickMenu_Entries)
+                               HUD_QuickMenu_load_entry(QuickMenu_Entries, sprintf(_("Command%d"), QuickMenu_Entries), "-");
+                       ++QuickMenu_Entries;
+                       HUD_QuickMenu_clear_entry(QuickMenu_Entries);
+                       QuickMenu_IsLastPage = FALSE;
+               }
+
+               hud_configure_active_panel = HUD_PANEL_QUICKMENU;
+       }
+
+       HUD_Panel_UpdateCvars(quickmenu);
+       HUD_Panel_ApplyFadeAlpha();
+
+       HUD_Panel_DrawBg(1);
+
+       if(panel_bg_padding)
+       {
+               panel_pos += '1 1 0' * panel_bg_padding;
+               panel_size -= '2 2 0' * panel_bg_padding;
+       }
+
+       float i;
+       vector fontsize;
+       string color;
+       fontsize = '1 1 0' * (panel_size_y / QUICKMENU_MAXLINES);
+
+       if (!QuickMenu_IsLastPage)
+       {
+               color = "^5";
+               HUD_QuickMenu_DrawEntry(panel_pos + eY * (panel_size_y - fontsize_y), sprintf("%d: %s%s", 0, color, _("Continue...")), fontsize);
+       }
+       else
+               panel_pos_y += ((QUICKMENU_MAXLINES - QuickMenu_Entries) * fontsize_y) / 2;
+
+       for (i = 1; i <= QuickMenu_Entries; ++i) {
+               if (QuickMenu_Description[i] == "")
+                       break;
+               if (QuickMenu_Command[i] == "")
+                       color = "^4";
+               else
+                       color = "^3";
+               HUD_QuickMenu_DrawEntry(panel_pos, sprintf("%d: %s%s", i, color, QuickMenu_Description[i]), fontsize);
+               panel_pos_y += fontsize_y;
+       }
+}
+
 /*
 ==================
 Main HUD system
@@ -4409,6 +4844,8 @@ switch (id) {\
                HUD_Physics(); break;\
        case (HUD_PANEL_CENTERPRINT):\
                HUD_CenterPrint(); break;\
+       case (HUD_PANEL_QUICKMENU):\
+               HUD_QuickMenu(); break;\
 } ENDS_WITH_CURLY_BRACE
 
 void HUD_Main (void)
@@ -4573,6 +5010,8 @@ void HUD_Main (void)
                HUD_Radar();
        if(autocvar__con_chat_maximized)
                HUD_Chat();
+       if(hud_panel_quickmenu)
+               HUD_QuickMenu();
 
        if(autocvar__hud_configure)
        {
index 90ece36ac0d77117d47fe83970f40c36585bebdd..14f9ae5f0a8609f8e25592a2cfe9c6345b6b4dd2 100644 (file)
@@ -3,6 +3,7 @@ string hud_panelorder_prev;
 
 float hud_draw_maximized;
 float hud_panel_radar_maximized;
+float hud_panel_quickmenu;
 
 vector mousepos;
 vector panel_click_distance; // mouse cursor distance from the top left corner of the panel (saved only upon a click)
@@ -282,6 +283,7 @@ switch(id) { \
        case HUD_PANEL_INFOMESSAGES: HUD_Panel_UpdateCvars(infomessages) break; \
        case HUD_PANEL_PHYSICS: HUD_Panel_UpdateCvars(physics); break;\
        case HUD_PANEL_CENTERPRINT: HUD_Panel_UpdateCvars(centerprint); break;\
+       case HUD_PANEL_QUICKMENU: HUD_Panel_UpdateCvars(quickmenu); break;\
 }
 
 #define HUD_Panel_UpdateCvarsForId(id) \
@@ -320,6 +322,7 @@ switch(id) { \
        case HUD_PANEL_INFOMESSAGES: HUD_Panel_UpdatePosSize(infomessages) break;\
        case HUD_PANEL_PHYSICS: HUD_Panel_UpdatePosSize(physics); break;\
        case HUD_PANEL_CENTERPRINT: HUD_Panel_UpdatePosSize(centerprint); break;\
+       case HUD_PANEL_QUICKMENU: HUD_Panel_UpdatePosSize(quickmenu); break;\
 }
 
 #define HUD_Panel_UpdatePosSizeForId(id) \
index 21ab08fa709c51aceb213849a47b6058f413747c..4d71cd1996e7fbd6d44f0c53a612293b77cf25bb 100644 (file)
@@ -186,6 +186,9 @@ void HUD_Panel_ExportCfg(string cfgname)
                                        HUD_Write_PanelCvar_q("_fade_subsequent_minfontsize");
                                        HUD_Write_PanelCvar_q("_fade_minfontsize");
                                        break;
+                               case HUD_PANEL_QUICKMENU:
+                                       HUD_Write_PanelCvar_q("_align");
+                                       break;
                        }
                        HUD_Write("\n");
                }
index c25fb059f6ebc2d52b017541eeb39e084ab4166b..a342fed9b662ab4f48a05c2040a4eb30d6b2837a 100644 (file)
@@ -392,42 +392,44 @@ float WR_SWITCHABLE       = 12; // (CSQC) impact effect
 float WR_PLAYERDEATH    = 13; // (SVQC) does not need to do anything
 float WR_GONETHINK     = 14; // (SVQC) logic to run every frame, also if no longer having the weapon as long as the switch away has not been performed
 
-float HUD_PANEL_WEAPONS                = 0;
-float HUD_PANEL_AMMO           = 1;
-float HUD_PANEL_POWERUPS       = 2;
-float HUD_PANEL_HEALTHARMOR    = 3;
-float HUD_PANEL_NOTIFY         = 4;
-float HUD_PANEL_TIMER          = 5;
-float HUD_PANEL_RADAR          = 6;
-float HUD_PANEL_SCORE          = 7;
-float HUD_PANEL_RACETIMER      = 8;
-float HUD_PANEL_VOTE           = 9;
-float HUD_PANEL_MODICONS       = 10;
-float HUD_PANEL_PRESSEDKEYS    = 11;
-float HUD_PANEL_CHAT           = 12;
-float HUD_PANEL_ENGINEINFO     = 13;
+float HUD_PANEL_WEAPONS                        = 0;
+float HUD_PANEL_AMMO                   = 1;
+float HUD_PANEL_POWERUPS               = 2;
+float HUD_PANEL_HEALTHARMOR            = 3;
+float HUD_PANEL_NOTIFY                 = 4;
+float HUD_PANEL_TIMER                  = 5;
+float HUD_PANEL_RADAR                  = 6;
+float HUD_PANEL_SCORE                  = 7;
+float HUD_PANEL_RACETIMER              = 8;
+float HUD_PANEL_VOTE                   = 9;
+float HUD_PANEL_MODICONS               = 10;
+float HUD_PANEL_PRESSEDKEYS            = 11;
+float HUD_PANEL_CHAT                   = 12;
+float HUD_PANEL_ENGINEINFO             = 13;
 float HUD_PANEL_INFOMESSAGES   = 14;
-float HUD_PANEL_PHYSICS        = 15;
-float HUD_PANEL_CENTERPRINT    = 16;
-float HUD_PANEL_NUM            = 17; // always last panel id + 1, please increment when adding a new panel
-
-string HUD_PANELNAME_WEAPONS           = "weapons";
-string HUD_PANELNAME_AMMO              = "ammo";
-string HUD_PANELNAME_POWERUPS          = "powerups";
-string HUD_PANELNAME_HEALTHARMOR       = "healtharmor";
-string HUD_PANELNAME_NOTIFY            = "notify";
-string HUD_PANELNAME_TIMER             = "timer";
-string HUD_PANELNAME_RADAR             = "radar";
-string HUD_PANELNAME_SCORE             = "score";
-string HUD_PANELNAME_RACETIMER         = "racetimer";
-string HUD_PANELNAME_VOTE              = "vote";
-string HUD_PANELNAME_MODICONS          = "modicons";
-string HUD_PANELNAME_PRESSEDKEYS       = "pressedkeys";
-string HUD_PANELNAME_CHAT              = "chat";
-string HUD_PANELNAME_ENGINEINFO                = "engineinfo";
+float HUD_PANEL_PHYSICS                        = 15;
+float HUD_PANEL_CENTERPRINT            = 16;
+float HUD_PANEL_QUICKMENU              = 17;
+float HUD_PANEL_NUM                            = 18; // always last panel id + 1, please increment when adding a new panel
+
+string HUD_PANELNAME_WEAPONS           = "weapons";
+string HUD_PANELNAME_AMMO                      = "ammo";
+string HUD_PANELNAME_POWERUPS          = "powerups";
+string HUD_PANELNAME_HEALTHARMOR       = "healtharmor";
+string HUD_PANELNAME_NOTIFY                    = "notify";
+string HUD_PANELNAME_TIMER                     = "timer";
+string HUD_PANELNAME_RADAR                     = "radar";
+string HUD_PANELNAME_SCORE                     = "score";
+string HUD_PANELNAME_RACETIMER         = "racetimer";
+string HUD_PANELNAME_VOTE                      = "vote";
+string HUD_PANELNAME_MODICONS          = "modicons";
+string HUD_PANELNAME_PRESSEDKEYS       = "pressedkeys";
+string HUD_PANELNAME_CHAT                      = "chat";
+string HUD_PANELNAME_ENGINEINFO                = "engineinfo";
 string HUD_PANELNAME_INFOMESSAGES      = "infomessages";
-string HUD_PANELNAME_PHYSICS   = "physics";
+string HUD_PANELNAME_PHYSICS           = "physics";
 string HUD_PANELNAME_CENTERPRINT       = "centerprint";
+string HUD_PANELNAME_QUICKMENU         = "quickmenu";
 
 #define SERVERFLAG_ALLOW_FULLBRIGHT 1
 #define SERVERFLAG_TEAMPLAY 2
index bd603b74c25905b90edd304a116d12e3d0019576..62bfe781151ae379d47a04340c1a0b8d8e26eb7d 100644 (file)
@@ -271,6 +271,7 @@ switch(id) {\
        case HUD_PANEL_INFOMESSAGES: panel_name = HUD_PANELNAME_INFOMESSAGES; break; \
        case HUD_PANEL_PHYSICS: panel_name = HUD_PANELNAME_PHYSICS; break; \
        case HUD_PANEL_CENTERPRINT: panel_name = HUD_PANELNAME_CENTERPRINT; break; \
+       case HUD_PANEL_QUICKMENU: panel_name = HUD_PANELNAME_QUICKMENU; break; \
 } ENDS_WITH_CURLY_BRACE
 
 // Get name of specified panel id
index 0a3a55c5f1d4bc214045b2c32731adac5779c156..2f57008d5494a4c59aadf11fd6996a56e360a6e0 100644 (file)
 #include "xonotic/dialog_hudpanel_weapons.c"
 #include "xonotic/dialog_hudpanel_physics.c"
 #include "xonotic/dialog_hudpanel_centerprint.c"
+#include "xonotic/dialog_hudpanel_quickmenu.c"
 #include "xonotic/slider_picmip.c"
diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.c b/qcsrc/menu/xonotic/dialog_hudpanel_quickmenu.c
new file mode 100644 (file)
index 0000000..16c3337
--- /dev/null
@@ -0,0 +1,29 @@
+#ifdef INTERFACE
+CLASS(XonoticHUDQuickMenuDialog) EXTENDS(XonoticRootDialog)
+       METHOD(XonoticHUDQuickMenuDialog, fill, void(entity))
+       ATTRIB(XonoticHUDQuickMenuDialog, title, string, _("Quick Menu Panel"))
+       ATTRIB(XonoticHUDQuickMenuDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
+       ATTRIB(XonoticHUDQuickMenuDialog, intendedWidth, float, 0.4)
+       ATTRIB(XonoticHUDQuickMenuDialog, rows, float, 15)
+       ATTRIB(XonoticHUDQuickMenuDialog, columns, float, 4)
+       ATTRIB(XonoticHUDQuickMenuDialog, name, string, "HUDquickmenu")
+ENDCLASS(XonoticHUDQuickMenuDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void XonoticHUDQuickMenuDialog_fill(entity me)
+{
+       entity e;
+       string panelname = "quickmenu";
+
+       DIALOG_HUDPANEL_COMMON_NOTOGGLE();
+
+       me.TR(me);
+               me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Text alignment:")));
+       me.TR(me);
+               me.TDempty(me, 0.2);
+                       me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(3, "hud_panel_quickmenu_align", "0", _("Left")));
+                       me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(3, "hud_panel_quickmenu_align", "0.5", _("Center")));
+                       me.TD(me, 1, 3.8/3, e = makeXonoticRadioButton(3, "hud_panel_quickmenu_align", "1", _("Right")));
+}
+#endif
index f9d86c2dd229276aadb7272c9484f165bb1ad606..f5a3ac3e4ec50c3bfb8de57d008c5a713f125d27 100644 (file)
@@ -124,8 +124,12 @@ void MainWindow_configureMainWindow(entity me)
        i = spawnXonoticHUDCenterprintDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       
+
+       i = spawnXonoticHUDQuickMenuDialog();
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
+
        // dialogs used by settings
        me.userbindEditDialog = i = spawnXonoticUserbindEditDialog();
        i.configureDialog(i);
diff --git a/quickmenu.txt b/quickmenu.txt
new file mode 100644 (file)
index 0000000..58ca664
--- /dev/null
@@ -0,0 +1,25 @@
+"Chat"
+"nice one" "say :-) / nice one"
+"good game" "say good game"
+"hi / good luck" "say hi / good luck and have fun"
+"Chat"
+"Team chat"
+"quad soon" "say_team quad soon"
+"free item, icon" "say_team free item %x^7 (l:%y^7); g_waypointsprite_team_here_p"
+"took item, icon" "say_team took item (l:%l^7); g_waypointsprite_team_here"
+"negative" "say_team negative"
+"positive" "say_team positive"
+"need help, icon" "say_team need help (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_helpme; cmd voice needhelp"
+"enemy seen, icon" "say_team enemy seen (l:%y^7); g_waypointsprite_team_danger_p; cmd voice incoming"
+"flag seen, icon" "say_team flag seen (l:%y^7); g_waypointsprite_team_here_p; cmd voice seenflag"
+"defending, icon" "say_team defending (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here"
+"roaming, icon" "say_team roaming (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here"
+"attacking, icon" "say_team attacking (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here"
+"killed flag, icon" "say_team killed flagcarrier (l:%y^7); g_waypointsprite_team_here_p"
+"dropped flag, icon" "say_team dropped flag (l:%d^7); g_waypointsprite_team_here_d"
+"drop gun, icon" "say_team dropped gun %w^7 (l:%l^7); g_waypointsprite_team_here; wait; dropweapon"
+"drop flag/key, icon" "say_team dropped flag/key %w^7 (l:%l^7); g_waypointsprite_team_here; wait; +use"
+"Team chat"
+"screenshot" "wait; screenshot"
+"toggle recording .avi" "wait; toggle cl_capturevideo"
+"toggle fullscreen" "toggle vid_fullscreen; vid_restart"