Merge branch 'terencehill/quickmenu_file_example' into 'master'
authorMario <zacjardine@y7mail.com>
Sun, 8 Nov 2015 08:28:35 +0000 (08:28 +0000)
committerMario <zacjardine@y7mail.com>
Sun, 8 Nov 2015 08:28:35 +0000 (08:28 +0000)
Quickmenu file example

See merge request !249

1  2 
qcsrc/client/commands/cl_cmd.qc

@@@ -8,7 -8,8 +8,7 @@@
  
  #include "../autocvars.qh"
  #include "../defs.qh"
 -#include "../hud.qh"
 -#include "../hud_config.qh"
 +#include "../hud/all.qh"
  #include "../main.qh"
  #include "../mapvoting.qh"
  #include "../miscfunctions.qh"
@@@ -171,13 -172,15 +171,13 @@@ void LocalCommand_debugmodel(int reques
                case CMD_REQUEST_COMMAND:
                {
                        string modelname = argv(1);
 -                      entity debugmodel_entity;
  
 -                      debugmodel_entity = spawn();
 +                      entity debugmodel_entity = new(debugmodel);
                        precache_model(modelname);
                        _setmodel(debugmodel_entity, modelname);
                        setorigin(debugmodel_entity, view_origin);
                        debugmodel_entity.angles = view_angles;
                        debugmodel_entity.draw = DrawDebugModel;
 -                      debugmodel_entity.classname = "debugmodel";
  
                        return;
                }
@@@ -267,6 -270,13 +267,13 @@@ void LocalCommand_hud(int request, int 
  
                                case "quickmenu":
                                {
+                                       if (argv(2) == "help")
+                                       {
+                                               LOG_INFO(" quickmenu [[default | file | \"\"] submenu]\n");
+                                               LOG_INFO("Called without options (or with \"\") loads either the default quickmenu or a quickmenu file if hud_panel_quickmenu_file is set to a valid filename.\n");
+                                               LOG_INFO("A submenu name can be given to open the quickmenu directly in a submenu; it requires to specify 'default', 'file' or '\"\"' option.\n");
+                                               return;
+                                       }
                                        if (QuickMenu_IsOpened())
                                                QuickMenu_Close();
                                        else
                        LOG_INFO("  'configname' is the name to save to for \"save\" action,\n");
                        LOG_INFO("  'radartoggle' is to control hud_panel_radar_maximized for \"radar\" action,\n");
                        LOG_INFO("  and 'layout' is how to organize the scoreboard columns for the set action.\n");
-                       LOG_INFO("  quickmenu [[default | file | \"\"] submenu]\n");
-                       LOG_INFO("    Called without options (or with " ") loads either the default quickmenu or a quickmenu file if hud_panel_quickmenu_file is set to a valid filename.\n");
-                       LOG_INFO("    Submenu option allows to open quickmenu directly in a submenu, it requires to specify 'default', 'file' or '\"\"' option.\n");
-                       LOG_INFO("  Full list of commands here: \"configure, minigame, save, scoreboard_columns_help, scoreboard_columns_set, radar.\"\n");
+                       LOG_INFO("  Full list of commands here: \"configure, quickmenu, minigame, save, scoreboard_columns_help, scoreboard_columns_set, radar.\"\n");
                        return;
                }
        }