]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add hud_panel_infomessages_group0 cvar to allow disabling less important messages...
authorterencehill <piuntn@gmail.com>
Thu, 11 Aug 2016 18:36:03 +0000 (20:36 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 11 Aug 2016 18:36:03 +0000 (20:36 +0200)
_hud_common.cfg
qcsrc/client/hud/panel/infomessages.qc

index 8d954f3d878e815c9e7d4a661d13fe6e2b722571..08095a9c6b729e55fcc1ec3089be1ec11cd17140 100644 (file)
@@ -95,6 +95,7 @@ seta hud_panel_quickmenu_file "" "load the quick menu from this file (empty or 0
 seta hud_panel_quickmenu_translatecommands 0 "when the game is translated, translate strings inside commands too (useful for chat commands)"
 seta hud_panel_quickmenu_time 5 "quickmenu expires after this number of seconds in the same page"
 
+seta hud_panel_infomessages_group0 1 "show group 0 messages (showing keys for non-crucial actions you can do while spectating/observing)"
 seta hud_panel_infomessages_group_time 6 "number of seconds a message of a group lasts before it gets changed"
 seta hud_panel_infomessages_group_fadetime 0.4 "group message fade in/out time"
 
index c47a3d74e6444665bdb4a9181306132febfc26cd..d341b6492efdecf606dffde7229e770113b5f1fe 100644 (file)
@@ -5,6 +5,7 @@
 
 // Info messages panel (#14)
 
+float autocvar_hud_panel_infomessages_group0 = 1;
 float autocvar_hud_panel_infomessages_group_fadetime = 0.4;
 float autocvar_hud_panel_infomessages_group_time = 6;
 const int IMG_COUNT = 1; // number of InfoMessage Groups
@@ -88,27 +89,30 @@ void HUD_InfoMessages()
                                s = sprintf(_("^1Spectating: ^7%s"), entcs_GetName(current_player));
                        InfoMessage(s);
 
-                       img_curr_group = 0;
-                       switch(img_select(img_curr_group) % 3)
+                       if(autocvar_hud_panel_infomessages_group0)
                        {
-                               default:
-                               case 0:
-                                       if(spectatee_status == -1)
-                                               s = sprintf(_("^1Press ^3%s^1 to spectate"), getcommandkey(_("primary fire"), "+fire"));
-                                       else
-                                               s = sprintf(_("^1Press ^3%s^1 or ^3%s^1 for next or previous player"), getcommandkey(_("next weapon"), "weapnext"), getcommandkey(_("previous weapon"), "weapprev"));
-                                       break;
-                               case 1:
-                                       if(spectatee_status == -1)
-                                               s = sprintf(_("^1Use ^3%s^1 or ^3%s^1 to change the speed"), getcommandkey(_("next weapon"), "weapnext"), getcommandkey(_("previous weapon"), "weapprev"));
-                                       else
-                                               s = sprintf(_("^1Press ^3%s^1 to observe, ^3%s^1 to change camera mode"), getcommandkey(_("secondary fire"), "+fire2"), getcommandkey(_("drop weapon"), "dropweapon"));
-                                       break;
-                               case 2:
-                                       s = sprintf(_("^1Press ^3%s^1 for gamemode info"), getcommandkey(_("server info"), "+show_info"));
-                                       break;
+                               img_curr_group = 0;
+                               switch(img_select(img_curr_group) % 3)
+                               {
+                                       default:
+                                       case 0:
+                                               if(spectatee_status == -1)
+                                                       s = sprintf(_("^1Press ^3%s^1 to spectate"), getcommandkey(_("primary fire"), "+fire"));
+                                               else
+                                                       s = sprintf(_("^1Press ^3%s^1 or ^3%s^1 for next or previous player"), getcommandkey(_("next weapon"), "weapnext"), getcommandkey(_("previous weapon"), "weapprev"));
+                                               break;
+                                       case 1:
+                                               if(spectatee_status == -1)
+                                                       s = sprintf(_("^1Use ^3%s^1 or ^3%s^1 to change the speed"), getcommandkey(_("next weapon"), "weapnext"), getcommandkey(_("previous weapon"), "weapprev"));
+                                               else
+                                                       s = sprintf(_("^1Press ^3%s^1 to observe, ^3%s^1 to change camera mode"), getcommandkey(_("secondary fire"), "+fire2"), getcommandkey(_("drop weapon"), "dropweapon"));
+                                               break;
+                                       case 2:
+                                               s = sprintf(_("^1Press ^3%s^1 for gamemode info"), getcommandkey(_("server info"), "+show_info"));
+                                               break;
+                               }
+                               InfoMessage(s);
                        }
-                       InfoMessage(s);
 
                        if(gametype == MAPINFO_TYPE_LMS)
                        {