From: terencehill Date: Thu, 11 Aug 2016 18:36:03 +0000 (+0200) Subject: Add hud_panel_infomessages_group0 cvar to allow disabling less important messages... X-Git-Tag: xonotic-v0.8.2~728 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f99a074e38d681de689a00e91e4569e0acb6a4cd;p=xonotic%2Fxonotic-data.pk3dir.git Add hud_panel_infomessages_group0 cvar to allow disabling less important messages while spectating/observing --- diff --git a/_hud_common.cfg b/_hud_common.cfg index 8d954f3d8..08095a9c6 100644 --- a/_hud_common.cfg +++ b/_hud_common.cfg @@ -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" diff --git a/qcsrc/client/hud/panel/infomessages.qc b/qcsrc/client/hud/panel/infomessages.qc index c47a3d74e..d341b6492 100644 --- a/qcsrc/client/hud/panel/infomessages.qc +++ b/qcsrc/client/hud/panel/infomessages.qc @@ -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) {