X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Finfomessages.qc;h=30b7fa8a7929bf46a9b618e3e7c2b67d918b8aa6;hb=87cbf00c7734cf2910502c217b5c5157511ba5ea;hp=33f797f3d3201b0a337596a774f709c1c8244ce9;hpb=2bb4c42f723576432bb2c80e0afe0a09ec7350f3;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/infomessages.qc b/qcsrc/client/hud/panel/infomessages.qc index 33f797f3d..30b7fa8a7 100644 --- a/qcsrc/client/hud/panel/infomessages.qc +++ b/qcsrc/client/hud/panel/infomessages.qc @@ -1,11 +1,16 @@ +#include "infomessages.qh" + +#include +#include + // Info messages panel (#14) -#define drawInfoMessage(s) do { \ +#define drawInfoMessage(s) MACRO_BEGIN { \ if(autocvar_hud_panel_infomessages_flip) \ o.x = pos.x + mySize.x - stringwidth(s, true, fontsize); \ drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL); \ o.y += fontsize.y; \ -} while(0) +} MACRO_END void HUD_InfoMessages() { if(!autocvar__hud_configure) @@ -18,6 +23,10 @@ void HUD_InfoMessages() pos = panel_pos; mySize = panel_size; + if (autocvar_hud_panel_infomessages_dynamichud) + HUD_Scale_Enable(); + else + HUD_Scale_Disable(); HUD_Panel_DrawBg(1); if(panel_bg_padding) { @@ -56,7 +65,7 @@ void HUD_InfoMessages() string s; if(!autocvar__hud_configure) { - if(spectatee_status && !intermission) + if(spectatee_status) { a = 1; if(spectatee_status == -1) @@ -74,7 +83,7 @@ void HUD_InfoMessages() 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"), getcommandkey("secondary fire", "+fire2")); + s = sprintf(_("^1Press ^3%s^1 to observe, ^3%s^1 to change camera mode"), getcommandkey("secondary fire", "+fire2"), getcommandkey("drop weapon", "dropweapon")); drawInfoMessage(s); s = sprintf(_("^1Press ^3%s^1 for gamemode info"), getcommandkey("server info", "+show_info")); @@ -94,18 +103,17 @@ void HUD_InfoMessages() else s = sprintf(_("^1Press ^3%s^1 to join"), getcommandkey("jump", "+jump")); drawInfoMessage(s); + } - //show restart countdown: - if (time < STAT(GAMESTARTTIME)) { - float countdown; - //we need to ceil, otherwise the countdown would be off by .5 when using round() - countdown = ceil(STAT(GAMESTARTTIME) - time); - s = sprintf(_("^1Game starts in ^3%d^1 seconds"), countdown); - drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL); - o.y += fontsize.y; - } + if (time < STAT(GAMESTARTTIME)) + { + //we need to ceil, otherwise the countdown would be off by .5 when using round() + float countdown = ceil(STAT(GAMESTARTTIME) - time); + s = sprintf(_("^1Game starts in ^3%d^1 seconds"), countdown); + drawInfoMessage(s); } - if(warmup_stage && !intermission) + + if(warmup_stage) { s = _("^2Currently in ^1warmup^2 stage!"); drawInfoMessage(s); @@ -117,7 +125,7 @@ void HUD_InfoMessages() else blinkcolor = "^3"; - if(ready_waiting && !intermission && !spectatee_status) + if(ready_waiting && !spectatee_status) { if(ready_waiting_for_me) { @@ -135,13 +143,13 @@ void HUD_InfoMessages() } drawInfoMessage(s); } - else if(warmup_stage && !intermission && !spectatee_status) + else if(warmup_stage && !spectatee_status) { s = sprintf(_("^2Press ^3%s^2 to end warmup"), getcommandkey("ready", "ready")); drawInfoMessage(s); } - if(teamplay && !intermission && !spectatee_status && gametype != MAPINFO_TYPE_CA && teamnagger) + if(teamplay && !spectatee_status && gametype != MAPINFO_TYPE_CA && teamnagger) { float ts_min = 0, ts_max = 0; tm = teams.sort_next;