X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=blobdiff_plain;f=data%2Fqcsrc%2Fclient%2Fsbar.qc;h=f0586cdacd7f5c653030cb81968818de8a93cbe6;hp=0022a7c11e137cc0a1c0a7b0454d09f141038f5b;hb=01a53c143145d0d348b6a9b4a71ee5494c428e8b;hpb=c8e091221e1177d074a83cf57cad3e32d277e98f diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index 0022a7c1..f0586cda 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -29,7 +29,6 @@ float ps_primary, ps_secondary; float ts_primary, ts_secondary; vector color; -float SCOREBOARD_OFFSET = 50; void CSQC_kh_hudreset(); void CSQC_kh_hud(); @@ -70,12 +69,12 @@ vector Sbar_AccuracyColor(float accuracy) return rgb; } -void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, float lettersize, vector rgb, float highlighted, float stroke, float alpha, float dflags) +void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, float lettersize, vector rgb, float alpha, float dflags) { - float l, i; - string str, tmp, l_length; + float l; + string str, tmp, l_length, final_num; float minus, plus; - vector vsize, num_color; + vector vsize; vsize_x = vsize_y = lettersize; vsize_z = 0; @@ -87,7 +86,6 @@ void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, fl if((showminusplus == 2 && num >= 0) || (num > 0 && showminusplus == 3)) { plus = true; - pos_x -= lettersize; } else plus = false; @@ -95,7 +93,6 @@ void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, fl { minus = true; num = -num; - pos_x -= lettersize; } else minus = false; @@ -112,54 +109,17 @@ void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, fl if(l > digits) { - str = substring(str, l-digits, 999); + str = substring(str, l - digits, 999); l = strlen(str); - } else if(l < digits) - pos_x += (digits-l) * lettersize; - - if (highlighted == 1) { - vector hl_size; - hl_size_x = vsize_x * l + vsize_x * 0.2; - hl_size_y = vsize_y * 1.1; - hl_size_z = 0; - if(minus) - hl_size_x = hl_size_x + vsize_x; - - vector hl_pos; - hl_pos_x = pos_x - lettersize/10; - hl_pos_y = pos_y - lettersize/20; - hl_pos_z = 0; - - drawpic(hl_pos, strcat("gfx/hud/sb_highlight_", l_length), hl_size, '1 1 1', alpha, dflags); } - if (stroke == 1) - num_color = '1 1 1'; - else - num_color = rgb; - if(minus) - { - if (stroke == 1) - drawpic(pos, "gfx/hud/num_minus_stroke", vsize, rgb, alpha, dflags); - drawpic(pos, "gfx/hud/num_minus", vsize, num_color, alpha, dflags); - pos_x += lettersize; - } else if(plus) - { - if (stroke == 1) - drawpic(pos, "gfx/hud/num_plus_stroke", vsize, rgb, alpha, dflags); - drawpic(pos, "gfx/hud/num_plus", vsize, num_color, alpha, dflags); - pos_x += lettersize; - } + final_num = "-"; + else if(plus) + final_num = "+"; - for(i = 0; i < l; ++i) - { - tmp = substring(str, i, 1); - if (stroke == 1) - drawpic(pos, strcat("gfx/hud/num_", tmp, "_stroke"), vsize, rgb, alpha, dflags); - drawpic(pos, strcat("gfx/hud/num_", tmp), vsize, num_color, alpha, dflags); - pos_x += lettersize; - } + final_num = strcat(final_num, str); + drawstring(pos, final_num, vsize, rgb, alpha, dflags); } void Sbar_DrawXNum_Colored (vector pos, float x, float lettersize, float alpha) @@ -194,7 +154,7 @@ void Sbar_DrawXNum_Colored (vector pos, float x, float lettersize, float alpha) color_y = 0; color_z = 0; } - Sbar_DrawXNum(pos, x, 3, 0, lettersize, color, 0, 0, alpha, DRAWFLAG_NORMAL); + Sbar_DrawXNum(pos, x, 3, 0, lettersize, color, alpha, DRAWFLAG_NORMAL); } void Cmd_Sbar_SetFields(float argc); @@ -509,14 +469,15 @@ void Cmd_Sbar_SetFields(float argc) sbar_field[sbar_num_fields] = SP_SEPARATOR; have_separator = 1; } else { + if(gametype == GAME_RPG) + return; + for(j = 0; j < MAX_SCORE; ++j) if(str == strtolower(scores_label[j])) goto found; // sorry, but otherwise fteqcc -O3 miscompiles this and warns about "unreachable code" :notfound - if(str == "frags" && !(gametype == GAME_RPG)) - { + if(str == "frags") j = SP_FRAGS; - } else { if not(nocomplain) @@ -716,16 +677,6 @@ string Sbar_GetField(entity pl, float field) string Sbar_GetStomachField(entity pl, float field) { - sbar_field_rgb = '1 1 1'; - sbar_field_icon0 = ""; - sbar_field_icon1 = ""; - sbar_field_icon2 = ""; - sbar_field_icon0_rgb = '1 1 1'; - sbar_field_icon1_rgb = '1 1 1'; - sbar_field_icon2_rgb = '1 1 1'; - sbar_field_icon0_alpha = 1; - sbar_field_icon1_alpha = 1; - sbar_field_icon2_alpha = 1; switch(field) { case ST_HIGHLIGHT: @@ -743,6 +694,18 @@ string Sbar_GetStomachField(entity pl, float field) //return "error"; } +string Sbar_GetStomachFieldPred(entity pl, float field) +{ + switch(field) + { + case STP_NAME: + return GetPlayerName(pl.sv_entnum); + default: + return "N/A"; + } + //return "error"; +} + float xmin, xmax, ymin, ymax, sbwidth; float sbar_fixscoreboardcolumnwidth_len; float sbar_fixscoreboardcolumnwidth_iconlen; @@ -956,23 +919,27 @@ void Sbar_PrintStomachboardItem(vector pos, entity pl) string str; float f, field, field_number; + vector hl_color; field_number = 3; // the number of components each row has for(fieldcounter = 1; fieldcounter <= field_number; ++fieldcounter) { field = -fieldcounter; - if(field == SP_SEPARATOR) - break; - str = Sbar_GetStomachField(pl, field); // row highlighting if(field == ST_HIGHLIGHT) { - if(getstati(STAT_STOMACH_EATEN)) - drawfill(pos - '0 0 0', '193 11 0', stov(cvar_string("sbar_stomachboard_color2")), cvar("sbar_stomachboard_highlight_alpha"), DRAWFLAG_NORMAL); + if(getstati(STAT_VORE_EATEN)) + { + if(teamplay && GetPlayerColor(pl.entnum - 1) == GetPlayerColor(player_localentnum - 1)) // same team + hl_color = stov(cvar_string("sbar_stomachboard_color2")); + else + hl_color = stov(cvar_string("sbar_stomachboard_color3")); + } else - drawfill(pos - '0 0 0', '193 11 0', stov(cvar_string("sbar_stomachboard_color1")), cvar("sbar_stomachboard_highlight_alpha"), DRAWFLAG_NORMAL); + hl_color = stov(cvar_string("sbar_stomachboard_color1")); + drawfill(pos - '0 0 0', '193 11 0', hl_color, cvar("sbar_stomachboard_highlight_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); } if(field == ST_NAME) { @@ -982,11 +949,11 @@ void Sbar_PrintStomachboardItem(vector pos, entity pl) drawpic(pos, "gfx/sb_playercolor_pants", '22 11 0', colormapPaletteColor(mod(f, 16), 1), sbar_alpha_fg, DRAWFLAG_NORMAL); pos_x += 24; - drawcolorcodedstring(pos, str, '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos, textShortenToWidth(str, 138, '11 11 0', stringwidth_colors), '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL); } if(field == ST_HEALTH) - if(g_vore_showpreyhealth) { + if(stof(str) > 0) { pos_x += 138; if(pl.sv_entnum == player_localentnum - 1 || (spectatee_status && pl.sv_entnum == spectatee_status - 1)) drawcolorcodedstring(pos, "self", '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL); @@ -1004,7 +971,7 @@ void Sbar_PrintStomachboardItem(vector pos, entity pl) float fieldcounter2; void Sbar_PrintStomachboardItemPred(vector pos, entity pl) { - // shows the name of our eater + // shows the name of our predator string str; float f, field, field_number; @@ -1013,19 +980,16 @@ void Sbar_PrintStomachboardItemPred(vector pos, entity pl) for(fieldcounter2 = 1; fieldcounter2 <= field_number; ++fieldcounter2) { field = -fieldcounter2; - if(field == SP_SEPARATOR) - break; + str = Sbar_GetStomachFieldPred(pl, field); - str = Sbar_GetStomachField(pl, field); - - if(field == ST_NAME) { + if(field == STP_NAME) { f = stof(getplayerkey(pl.sv_entnum, "colors")); drawpic(pos, "gfx/sb_playercolor_base", '22 11 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); drawpic(pos, "gfx/sb_playercolor_shirt", '22 11 0', colormapPaletteColor(floor(f / 16), 0), sbar_alpha_fg, DRAWFLAG_NORMAL); drawpic(pos, "gfx/sb_playercolor_pants", '22 11 0', colormapPaletteColor(mod(f, 16), 1), sbar_alpha_fg, DRAWFLAG_NORMAL); pos_x += 24; - drawcolorcodedstring(pos, str, '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos, textShortenToWidth(str, 122, '11 11 0', stringwidth_colors), '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL); } } } @@ -1388,7 +1352,7 @@ void Sbar_DrawScoreboard() sbwidth = Sbar_GetWidth(6.5 * sbar_fontsize_y); xmin = 0.5 * (vid_conwidth - sbwidth); - ymin = SCOREBOARD_OFFSET; + ymin = cvar("sbar_scoreboard_offset"); xmax = vid_conwidth - xmin; ymax = vid_conheight - 0.2*vid_conheight; @@ -1400,7 +1364,10 @@ void Sbar_DrawScoreboard() // Heading drawfont = sbar_bigfont; - drawstringcenter('0 1 0' * ymin, "Scoreboard", '24 24 0', '1 1 1', sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL); + if(gametype == GAME_RPG) + drawstringcenter('0 1 0' * ymin, "Players", '24 24 0', '1 1 1', sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL); + else + drawstringcenter('0 1 0' * ymin, "Scoreboard", '24 24 0', '1 1 1', sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL); pos_y += 24 + 4; pos_y += sbar_fontsize_y; @@ -1419,10 +1386,10 @@ void Sbar_DrawScoreboard() continue; rgb = GetTeamRGB(tm.team); - Sbar_DrawXNum(pos - '9.5 0 0' * sbar_fontsize_y + '0 1 0' * sbar_fontsize_y, tm.(teamscores[ts_primary]), 6, 0, sbar_fontsize_y * 1.5, rgb, 0, 1, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(pos - '9.5 0 0' * sbar_fontsize_y + '0 1 0' * sbar_fontsize_y, tm.(teamscores[ts_primary]), 6, 0, sbar_fontsize_y * 1.5, rgb, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL); if(ts_primary != ts_secondary) - Sbar_DrawXNum(pos - '7.5 0 0' * sbar_fontsize_y + '0 2.5 0' * sbar_fontsize_y, tm.(teamscores[ts_secondary]), 6, 0, sbar_fontsize_y * 1, rgb, 0, 1, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(pos - '7.5 0 0' * sbar_fontsize_y + '0 2.5 0' * sbar_fontsize_y, tm.(teamscores[ts_secondary]), 6, 0, sbar_fontsize_y * 1, rgb, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL); pos = Sbar_Scoreboard_MakeTable(pos, tm, rgb, bg_size); } @@ -1481,7 +1448,10 @@ void Sbar_DrawScoreboard() // Print info string string str; float tl, fl, ll; - str = strcat("playing on ^2", shortmapname, "^7"); + if(gametype == GAME_RPG) + str = strcat("you are in ^2", shortmapname, "^7"); + else + str = strcat("playing on ^2", shortmapname, "^7"); tl = getstatf(STAT_TIMELIMIT); fl = getstatf(STAT_FRAGLIMIT); ll = getstatf(STAT_LEADLIMIT); @@ -1494,7 +1464,7 @@ void Sbar_DrawScoreboard() { if(tl > 0) str = strcat(str, " for ^1", ftos(tl), " minutes^7"); - if(fl > 0) + if(fl > 0 && !(gametype == GAME_RPG)) { if(tl > 0) str = strcat(str, " or"); @@ -1685,7 +1655,8 @@ void Sbar_DrawRaceStatus(vector pos) void Sbar_Score() { float score, distribution, leader; - vector score_pos, secondary_score_pos, distribution_color; + vector score_pos, secondary_score_pos, race_score_pos, distribution_color; + string racetime, secondary_racetime; entity tm, pl, me; me = (spectatee_status > 0) ? playerslots[spectatee_status - 1] : playerslots[player_localentnum - 1]; @@ -1697,8 +1668,8 @@ void Sbar_Score() if(gametype == GAME_RPG) return; - score_pos = top + '-240 8 0'; - secondary_score_pos = score_pos + '210 -6 0'; + score_pos = top + '-80 8 0'; + secondary_score_pos = score_pos + '80 -6 0'; if((scores_flags[ps_primary] & SFL_TIME) && !teamplay) { // race/cts record display on HUD pl = players.sort_next; @@ -1711,12 +1682,20 @@ void Sbar_Score() score = me.(scores[ps_primary]); float racemin, racesec, racemsec; - float distsec, distmsec, minusplus; + float distsec, distmsec; + string s_racemin, s_racesec, s_racemsec; racemin = floor(score/(60 * TIME_FACTOR)); racesec = floor((score - racemin*(60 * TIME_FACTOR))/TIME_FACTOR); racemsec = score - racemin*60*TIME_FACTOR - racesec*TIME_FACTOR; + if(racemin < 10) s_racemin = strcat("0", ftos(racemin)); + else s_racemin = ftos(racemin); + if(racesec < 10) s_racesec = strcat("0", ftos(racesec)); + else s_racesec = ftos(racesec); + if(racemsec < 10) s_racemsec = strcat("0", ftos(racemsec)); + else s_racemsec = ftos(racemsec); + if (pl && ((!(scores_flags[ps_primary] & SFL_ZERO_IS_WORST)) || score)) { // distribution display distribution = me.(scores[ps_primary]) - pl.(scores[ps_primary]); @@ -1724,34 +1703,29 @@ void Sbar_Score() if (distribution < TIME_FACTOR && distribution > -TIME_FACTOR) distmsec = fabs(distribution); else { - distsec = floor(fabs(distribution)/TIME_FACTOR); - distmsec = fabs(distribution) - distsec*TIME_FACTOR; - if (distribution < 0) - distsec = -distsec; + distsec = floor(fabs(distribution) / TIME_FACTOR); + distmsec = fabs(distribution) - distsec * TIME_FACTOR; } - if (distribution <= 0) { + if (distribution < 0) { distribution_color = '0 1 0'; - minusplus = 1; // minusplus 1: always prefix with minus sign + secondary_racetime = "-"; // always prefix with minus sign } - else { + else if (distribution > 0) { distribution_color = '1 0 0'; - minusplus = 2; // minusplus 1: always prefix with plus sign + secondary_racetime = "+"; // minusplus 1: always prefix with plus sign } - Sbar_DrawXNum(score_pos + '335 16 0' - '16 0 0' * TIME_DECIMALS, distmsec, -TIME_DECIMALS, 0, 16, distribution_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); - Sbar_DrawXNum(score_pos + '403 16 0' - '16 0 0' * TIME_DECIMALS, distsec, 4, minusplus, 16, distribution_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); - drawpic(score_pos + '335 16 0' - '16 0 0' * TIME_DECIMALS, "gfx/hud/num_dot", '16 16 0', distribution_color, sbar_alpha_fg, DRAWFLAG_ADDITIVE); - } - // race record display - if (distribution <= 0 || distribution == score) // draw the highlight background behind the timer if we have the lead - drawpic(score_pos + '335 0 0' - '32 0 0' * (4 + TIME_DECIMALS), "gfx/hud/sb_highlight_4", '0 28 0' + '32 0 0' * (4 + TIME_DECIMALS), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + else + distribution_color = '1 1 1'; - Sbar_DrawXNum(score_pos + '335 0 0' - TIME_DECIMALS * '30 0 0', racemsec, -TIME_DECIMALS, 0, 30, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); - Sbar_DrawXNum(score_pos + '335 0 0' - TIME_DECIMALS * '30 0 0' - '66 0 0', racesec, -2, 0, 30, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); - drawpic(score_pos + '335 0 0' - TIME_DECIMALS * '30 0 0' - '18 0 0', "gfx/hud/num_dot", '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE); + secondary_racetime = strcat(secondary_racetime, ftos(distsec), ".", ftos(distmsec)); + drawstring(score_pos + '222 0 0' - '14 0 0', secondary_racetime, '14 14 0', distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); + } - Sbar_DrawXNum(score_pos + '335 0 0' - TIME_DECIMALS * '30 0 0' - '132 0 0', racemin, -2, 0, 30, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); - drawpic(score_pos + '335 0 0' - TIME_DECIMALS * '30 0 0' - '84 0 0', "gfx/hud/num_colon", '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE); + racetime = strcat(s_racemin, " : ", s_racesec, " . ", s_racemsec); + race_score_pos = top + '0 0 0'; + race_score_pos -= '1 0 0' * stringwidth(racetime, FALSE, '30 30 0') * 0.5; + drawstring(race_score_pos, racetime, '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); } else if (!teamplay) { // non-teamgames, except race/cts // me vector := [team/connected frags id] @@ -1777,8 +1751,8 @@ void Sbar_Score() else distribution_color = '1 0 0'; - Sbar_DrawXNum(secondary_score_pos, distribution, 6, 0, 16, distribution_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); - Sbar_DrawXNum(score_pos, score, 6, 0, 34, distribution_color, leader, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(secondary_score_pos, distribution, 6, 3, 16, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(score_pos, score, 6, 0, 34, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); } else { // teamgames float max_fragcount; max_fragcount = -999; @@ -1795,11 +1769,11 @@ void Sbar_Score() if(tm.team == myteam) { if (max_fragcount == score) leader = 1; - Sbar_DrawXNum(score_pos, score, 6, 0, 34, GetTeamRGB(tm.team) * 0.8, leader, 1, sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(score_pos, score, 6, 0, 34, GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL); } else { if (max_fragcount == score) leader = 1; - Sbar_DrawXNum(secondary_score_pos, score, 6, 0, 16, GetTeamRGB(tm.team) * 0.8, leader, 1, sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(secondary_score_pos, score, 6, 3, 16, GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL); secondary_score_pos = secondary_score_pos + '0 16 0'; } } @@ -1921,7 +1895,8 @@ void Sbar_Score() void Sbar_Timer() { float timelimit, elapsedTime, minutes, seconds, timeleft, minutesLeft, secondsLeft; - vector bgpos, timer_color; + vector pos, bgpos, timer_color; + string finaltime; bgpos = '0 0 0'; vector topright; @@ -1961,22 +1936,20 @@ void Sbar_Timer() if (minutes < 10) bgpos_x = topright_x - (54 + 17 + 12) * scale; else if (minutes < 100) // nudge the timer background left if more digits are drawn - bgpos_x = topright_x - (72 + 17 + 12) * scale; + bgpos_x = topright_x - (62 + 17 + 12) * scale; else - bgpos_x = topright_x - (90 + 17 + 12) * scale; + bgpos_x = topright_x - (70 + 17 + 12) * scale; bgpos_y = 0; bgpos_z = 0; } else { minutes = minutesLeft; seconds = secondsLeft; - if (minutes == 0) - bgpos_x = topright_x - (36 + 7 + 12) * scale; - else if (minutes < 10) // nudge the timer background left if more digits are drawn + if (minutes < 10) // nudge the timer background left if more digits are drawn bgpos_x = topright_x - (54 + 17 + 12) * scale; else if (minutes < 100) - bgpos_x = topright_x - (72 + 17 + 12) * scale; + bgpos_x = topright_x - (62 + 17 + 12) * scale; else - bgpos_x = topright_x - (90 + 17 + 12) * scale; + bgpos_x = topright_x - (70 + 17 + 12) * scale; bgpos_y = 0; bgpos_z = 0; } @@ -1993,11 +1966,83 @@ void Sbar_Timer() } } - if(minutesLeft >= 1 || cvar("sbar_increment_maptime") || timelimit == 0 || warmup_stage) { - Sbar_DrawXNum(topright - ('103 -2 0' - '0 2 0') * scale, minutes, 3, 0, 18 * scale, timer_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); - drawpic(topright - ('53 0 0' - '0 1 0') * scale, "gfx/hud/num_colon", '18 18 0' * scale, timer_color, sbar_alpha_fg, DRAWFLAG_NORMAL); + drawpic(topright - ('19 0 0' + '3 0 0' - '0 2 0'), "gfx/hud/sb_time", '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + finaltime = strcat(ftos(minutes), ":"); + if(seconds < 10) + finaltime = strcat(finaltime, "0", ftos(seconds)); + else + finaltime = strcat(finaltime, ftos(seconds)); + + pos = topright - ('24 -2 0' + '3 0 0' - '0 2 0'); + pos -= '1 0 0' * stringwidth(finaltime, FALSE, 18 * scale * '1 1 0'); + drawstring(pos, finaltime, 18 * scale * '1 1 0', timer_color, sbar_alpha_fg, DRAWFLAG_NORMAL); +} + +void Sbar_Ring() +{ + vector ring_pos, ring1_color, ring2_color; + vector text_pos, text1_size, text2_size; + float ring_alpha, ring1_size, ring1_clip, ring2_size, ring2_clip; + string text1_msg, text2_msg; + + ring_pos_x = vid_conwidth / 2; + ring_pos_y = vid_conheight / 1.375; + ring1_size = 100; + ring2_size = 60; + ring_alpha = sbar_alpha_fg * 1; + text1_size = '12 12 0'; + text2_size = '10 10 0'; + + switch(getstati(STAT_SBRING1_TYPE)) + { + case 0: + // ring disabled + break; + case 1: + // ring shows vore system delay, empties with progress + ring1_color = '0.5 0.5 1'; + text1_msg = "Vore delay"; + break; + case 2: + // ring shows stomach kick delay, empties with progress + ring1_color = '1 1 0.5'; + text1_msg = "Kick delay"; + break; + default: + print(strcat("^1Error:^7 Unknown ring type: ", ftos(getstati(STAT_SBRING1_TYPE)), "\n")); + break; + } + switch(getstati(STAT_SBRING2_TYPE)) + { + case 0: + // ring disabled + break; + case 1: + // ring shows regurgitation preparing, fills with progress + ring2_color = '1 0.5 1'; + text2_msg = "Regurgitating..."; + break; + default: + print(strcat("^1Error:^7 Unknown ring type: ", ftos(getstati(STAT_SBRING1_TYPE)), "\n")); + break; + } + ring1_clip = getstatf(STAT_SBRING1_CLIP); + ring2_clip = getstatf(STAT_SBRING2_CLIP); + + if(text1_msg != "") + { + DrawCircleClippedPic(ring_pos, ring1_size, "gfx/hud/sb_ring.tga", ring1_clip, ring1_color, ring_alpha, DRAWFLAG_ADDITIVE); + text_pos_x = ring_pos_x - stringwidth(text1_msg, FALSE, text1_size) / 2; + text_pos_y = ring_pos_y - ring1_size / 2; + drawstring(text_pos, text1_msg, text1_size, ring1_color, sbar_alpha_fg, DRAWFLAG_NORMAL); + } + if(text2_msg != "") + { + DrawCircleClippedPic(ring_pos, ring2_size, "gfx/hud/sb_ring.tga", ring2_clip, ring2_color, ring_alpha, DRAWFLAG_ADDITIVE); + text_pos_x = ring_pos_x - stringwidth(text2_msg, FALSE, text2_size) / 2; + text_pos_y = ring_pos_y + ring1_size / 2; + drawstring(text_pos, text2_msg, text2_size, ring2_color, sbar_alpha_fg, DRAWFLAG_NORMAL); } - Sbar_DrawXNum(topright - ('36 -2 0' + '3 0 0' - '0 2 0') * scale, seconds, -2, 0, 18 * scale, timer_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); } void CSQC_Strength_Timer() { @@ -2025,10 +2070,7 @@ void CSQC_Strength_Timer() { picsize = '22 22 0'; countdown_fontsize = 18; - if (vid_conwidth >= 800) - pos = bottomright - '34 48 0'; - else - pos = bottomright - '34 96 0'; + pos = bottomright - '34 48 0'; //strength strength_time = getstatf(STAT_STRENGTH_FINISHED); @@ -2047,7 +2089,7 @@ void CSQC_Strength_Timer() { { drawpic(pos, "gfx/hud/sb_str", picsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE); } - Sbar_DrawXNum(pos - '40 -2 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(pos - '30 -2 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); } else if(dt > -1) { @@ -2070,7 +2112,7 @@ void CSQC_Strength_Timer() { { drawpic(pos - '0 -22 0', "gfx/hud/sb_invinc", picsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE); } - Sbar_DrawXNum(pos - '40 -24 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(pos - '30 -24 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); } else if(dt > -1) { @@ -2401,17 +2443,17 @@ void Sbar_DrawAccuracyStats_Description_Hitscan(vector position) drawstring(position + '0 9 0' * sbar_fontsize_y, "Shots missed:", sbar_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); } -void Sbar_DrawAccuracyStats_Description_Splash(vector position) +/*void Sbar_DrawAccuracyStats_Description_Splash(vector position) { drawstring(position + '0 3 0' * sbar_fontsize_y, "Maximum damage:", sbar_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); drawstring(position + '0 5 0' * sbar_fontsize_y, "Actual damage:", sbar_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); drawstring(position + '0 7 0' * sbar_fontsize_y, "Accuracy:", sbar_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); drawstring(position + '0 9 0' * sbar_fontsize_y, "Damage wasted:", sbar_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); -} +}*/ // we have no splash damage weapons, but keep this code just in case void Sbar_DrawAccuracyStats() { - float i, count_hitscan, count_splash, row_hitscan, row_splash; // count is the number of 'colums' + float i, count_hitscan, /*count_splash,*/ row_hitscan/*, row_splash*/; // count is the number of 'colums' float weapon_hit, weapon_damage, weapon_stats; float left_border; // position where the weapons start, the description is in the border vector fill_colour, fill_size; @@ -2426,7 +2468,7 @@ void Sbar_DrawAccuracyStats() drawfont = sbar_bigfont; pos_x = 0; - pos_y = SCOREBOARD_OFFSET; + pos_y = cvar("sbar_scoreboard_offset"); pos_z = 0; drawstringcenter(pos, "Weapon Accuracy", 2 * sbar_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); @@ -2452,11 +2494,11 @@ void Sbar_DrawAccuracyStats() return; } - float top_border_hitscan = SCOREBOARD_OFFSET + 55; // position where the hitscan row starts: pixels down the screen + float top_border_hitscan = cvar("sbar_scoreboard_offset") + 55; // position where the hitscan row starts: pixels down the screen Sbar_DrawAccuracyStats_Description_Hitscan('1 0 0' * col_margin + '0 1 0' * top_border_hitscan); - float top_border_splash = SCOREBOARD_OFFSET + 175; // position where the splash row starts: pixels down the screen - Sbar_DrawAccuracyStats_Description_Splash('1 0 0' * col_margin + '0 1 0' * top_border_splash); +// float top_border_splash = cvar("sbar_scoreboard_offset") + 175; // position where the splash row starts: pixels down the screen +// Sbar_DrawAccuracyStats_Description_Splash('1 0 0' * col_margin + '0 1 0' * top_border_splash); for(i = WEP_FIRST; i <= WEP_LAST; ++i) { @@ -2468,7 +2510,7 @@ void Sbar_DrawAccuracyStats() border_colour = (i == activeweapon) ? '1 1 1' : '0 0 0'; // white or black border if (weapon_damage) { - if (self.spawnflags & WEP_TYPE_SPLASH) { + /*if (self.spawnflags & WEP_TYPE_SPLASH) { weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100); fill_colour_x = 1 - 0.015 * weapon_stats; @@ -2518,7 +2560,9 @@ void Sbar_DrawAccuracyStats() drawstringright(pos + '4.5 0 0' * sbar_fontsize_x + '0 9 0' * sbar_fontsize_y, ftos(max(0, weapon_damage - weapon_hit)), sbar_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); ++count_splash; - } else if (self.spawnflags & WEP_TYPE_HITSCAN) { + } else*/ // we have no splash damage weapons, but keep this code just in case + + if (self.spawnflags & WEP_TYPE_HITSCAN) { weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100); fill_colour_x = 1 - 0.015 * weapon_stats; @@ -2589,7 +2633,7 @@ float GetAmmoStat(float i) { switch(i) { - case 1: return STAT_FUEL; + case 0: return STAT_FUEL; default: return -1; } } @@ -2598,7 +2642,7 @@ float GetAmmoItemCode(float i) { switch(i) { - case 1: return IT_FUEL; + case 0: return IT_FUEL; default: return -1; } } @@ -2607,7 +2651,7 @@ string GetAmmoPicture(float i) { switch(i) { - case 1: return "gfx/hud/sb_fuel"; + case 0: return "gfx/hud/sb_fuel"; default: return ""; } } @@ -2635,7 +2679,7 @@ vector stomachstatus_colorfade_current; vector StomachStatus_ColorFade(vector target_color) { local float step; - step = cvar("sbar_stomachboard_status_fade"); + step = cvar("sbar_stomachboard_status_fade") * frametime; if(stomachstatus_colorfade_current_x >= target_color_x + step) stomachstatus_colorfade_current_x -= step; @@ -2899,15 +2943,9 @@ void Sbar_Draw (void) Sbar_UpdatePlayerTeams(); if (intermission == 2) // map voting screen { - if(spectatee_status != -1) { - Sbar_Score(); - Sbar_Timer(); - } - else if(sb_showscores) { - Sbar_DrawScoreboard(); - Sbar_Score(); - Sbar_Timer(); - } + Sbar_Timer(); + if(sb_showscores) + Sbar_DrawScoreboard(); else Sbar_FinaleOverlay(); @@ -2930,7 +2968,7 @@ void Sbar_Draw (void) else Sbar_DrawScoreboard(); float armor, health; - armor = getstati(STAT_ARMOR); // armor is not used in Vore Tournament by default, but still exists for mods that might want it + armor = getstati(STAT_ARMOR); health = getstati(STAT_HEALTH); stat_items = getstati(STAT_ITEMS); @@ -2939,76 +2977,89 @@ void Sbar_Draw (void) fade = 3.2 - 2 * (time - weapontime); fade = bound(0.7, fade, 1); - // draw the stomach board - if (cvar("viewsize") <= 100) { - if (teamplay) - drawpic(bottomleft- '0 256 0', "gfx/hud/bg_stomach", '256 256 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // hud color = myteam color - else { - // allow for custom HUD colors in non-teamgames - color_x = cvar("sbar_color_bg_r"); - color_y = cvar("sbar_color_bg_g"); - color_z = cvar("sbar_color_bg_b"); - - drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach", '256 256 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL); - } - } - - if(getstati(STAT_STOMACH_EATEN)) + if(g_vore) // only when the vore system is active { - drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(stov(cvar_string("sbar_stomachboard_color2"))), cvar("sbar_stomachboard_status_alpha"), DRAWFLAG_NORMAL); - drawstring(bottomleft - '-80 172 0', "predator:", '10 10 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - } - else - { - drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(stov(cvar_string("sbar_stomachboard_color1"))), cvar("sbar_stomachboard_status_alpha"), DRAWFLAG_NORMAL); - drawstring(bottomleft - '-80 172 0', "self:", '10 10 0', ' 1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - } - - float stomach_load; - stomach_load = getstati(STAT_STOMACH_LOAD); // shows the predator's stomach load when we are eaten, and ours otherwise - - Sbar_DrawXNum(bottomleft - '-18 170 0', bound(0, stomach_load, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); - drawstring(bottomleft - '-40 170 0', "/", '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - Sbar_DrawXNum(bottomleft - '-50 170 0', bound(0, g_balance_vore_swallow_limit, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); - - if(getstati(STAT_STOMACH_DIGESTING)) - drawstring(bottomleft - '-76 142 0', "stomach digesting", '12 12 0', '1 0.5 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL); - else if(stomach_load == g_balance_vore_swallow_limit) - drawstring(bottomleft - '-76 142 0', "stomach full", '12 12 0', '0.5 1 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL); - else if(!stomach_load) - drawstring(bottomleft - '-76 142 0', "stomach empty", '12 12 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - else - drawstring(bottomleft - '-76 142 0', "stomach has prey", '12 12 0', '0.75 1 0.75', sbar_alpha_fg, DRAWFLAG_NORMAL); - - // draw the stomach board player list - entity pl; - float f; - - pos = bottomleft; - for(pl = players.sort_next; pl; pl = pl.sort_next) - { - if(pl.team == COLOR_SPECTATOR) - continue; + // draw the stomach board + if (cvar("viewsize") <= 100) { + if (teamplay) + drawpic(bottomleft- '0 256 0', "gfx/hud/bg_stomach", '256 256 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // hud color = myteam color + else { + // allow for custom HUD colors in non-teamgames + color_x = cvar("sbar_color_bg_r"); + color_y = cvar("sbar_color_bg_g"); + color_z = cvar("sbar_color_bg_b"); + + drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach", '256 256 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL); + } + } - if(getstati(STAT_STOMACH_EATEN)) - f = pl.pleater == getstati(STAT_STOMACH_EATEN); - else + vector hl_color; + string hl_string; + if(getstati(STAT_VORE_EATEN)) { - if(spectatee_status) - f = pl.pleater == spectatee_status; + if(teamplay && GetPlayerColor(getstati(STAT_VORE_EATEN) - 1) == GetPlayerColor(player_localentnum - 1)) // same team + hl_color = stov(cvar_string("sbar_stomachboard_color2")); else - f = pl.pleater == player_localentnum; + hl_color = stov(cvar_string("sbar_stomachboard_color3")); + hl_string = "predator:"; } - - if(f) + else { - Sbar_PrintStomachboardItem(pos - '-16 124 0', pl); - pos_y += 1.25 * sbar_fontsize_y; + hl_color = stov(cvar_string("sbar_stomachboard_color1")); + hl_string = "self:"; } + drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(hl_color), cvar("sbar_stomachboard_status_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); + drawstring(bottomleft - '-80 173 0', hl_string, '11 11 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + + float stomach_load; + stomach_load = getstati(STAT_VORE_LOAD); // shows the predator's stomach load when we are eaten, and ours otherwise + + vector status_pos; + string status_text; + status_text = strcat(ftos(bound(0, stomach_load, 9)), "/", ftos(bound(0, g_balance_vore_swallow_limit, 9))); + status_pos = bottomleft - '-43 171 0'; + status_pos -= '1 0 0' * stringwidth(status_text, FALSE, '22 22 0') * 0.5; + drawstring(status_pos, status_text, '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + + if(getstati(STAT_VORE_DIGESTING)) + drawstring(bottomleft - '-76 142 0', "stomach digesting", '12 12 0', '1 0.5 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL); + else if(stomach_load == g_balance_vore_swallow_limit) + drawstring(bottomleft - '-76 142 0', "stomach full", '12 12 0', '0.5 1 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL); + else if(!stomach_load) + drawstring(bottomleft - '-76 142 0', "stomach empty", '12 12 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + else + drawstring(bottomleft - '-76 142 0', "stomach has prey", '12 12 0', '0.75 1 0.75', sbar_alpha_fg, DRAWFLAG_NORMAL); + + // draw the stomach board player list + entity pl; + float f; + + pos = bottomleft; + for(pl = players.sort_next; pl; pl = pl.sort_next) + { + if(pl.team == COLOR_SPECTATOR) + continue; + + if(getstati(STAT_VORE_EATEN)) + f = pl.plpredator == getstati(STAT_VORE_EATEN); + else + { + if(spectatee_status) + f = pl.plpredator == spectatee_status; + else + f = pl.plpredator == player_localentnum; + } - if(getstati(STAT_STOMACH_EATEN)) - if(pl.sv_entnum == getstati(STAT_STOMACH_EATEN) - 1) - Sbar_PrintStomachboardItemPred(bottomleft - '-76 156 0', pl); + if(f) + { + Sbar_PrintStomachboardItem(pos - '-16 124 0', pl); + pos_y += 1.1 * sbar_fontsize_y; + } + + if(getstati(STAT_VORE_EATEN)) + if(pl.sv_entnum == getstati(STAT_VORE_EATEN) - 1) + Sbar_PrintStomachboardItemPred(bottomleft - '-76 156 0', pl); + } } if (cvar("viewsize") <= 100) { @@ -3024,32 +3075,87 @@ void Sbar_Draw (void) } } - vector health_pos; - health_pos = bottom - '77 58 0'; + vector health_pos, armor_pos; + health_pos = bottom - '43 58 0'; + armor_pos = bottom - '43 68 0'; + + // armor + x = armor; + if (x > 0) + { + drawpic(armor_pos + '-8 -13.5 0', "gfx/hud/sb_armor", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + armor_pos -= '1 0 0' * stringwidth(ftos(x), FALSE, '12 12 0') * 0.5; + Sbar_DrawXNum_Colored(armor_pos, x, 12, sbar_alpha_fg); + } // health x = health; - drawpic(health_pos + '22 16 0', "gfx/hud/sb_health", '32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - if(x < 100) health_pos_x -= 9; // always center - if(x < 10) health_pos_x -= 11; // always center + drawpic(health_pos + '-11 16 0', "gfx/hud/sb_health", '32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + health_pos -= '1 0 0' * stringwidth(ftos(x), FALSE, '22 22 0') * 0.5; Sbar_DrawXNum_Colored(health_pos, x, 22, sbar_alpha_fg); - // fuel ammo - a = getstati(GetAmmoStat(1)); // how much fuel do we have? - - if (a > 0) { // if we have fuel, draw the amount - float invincibility_time, dt; - invincibility_time = getstatf(STAT_INVINCIBLE_FINISHED); - dt = invincibility_time - time; - pos_x = bottom_x + 140; - pos_y = bottom_y - 20; - drawpic(pos - '98 18 0', GetAmmoPicture(1), '20 20 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - Sbar_DrawXNum(pos - '144 16 0', a, 3, 0, 16, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); + // ammo + pos_x = bottom_x + 140; + pos_y = bottom_y - 20; + + float weapon_clipload, weapon_clipsize; + vector ammo_pos_offset; + + // if we are using the jetpack, show fuel ammo. Otherwise show the ammo of our weapon + if(stat_items & IT_JETPACK && button_jetpack) + { + a = getstati(GetAmmoStat(0)); // how much fuel do we have? + drawpic(pos - '98 18 0', GetAmmoPicture(0), '20 20 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + ammo_pos_offset = '1 0 0' * stringwidth(ftos(a), FALSE, '16 16 0') * 0.5; + Sbar_DrawXNum(pos - '118 16 0' - ammo_pos_offset, a, 3, 0, 16, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); } + else + { + float i; + for (i = 0; i < 1; ++i) + { + if (stat_items & GetAmmoItemCode(i)) + { + a = getstati(GetAmmoStat(i)); // how much ammo do we have of type i? + drawpic(pos - '98 18 0', GetAmmoPicture(i), '20 20 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE); - // draw scores and timer + // if the weapon we're holding is reloadable, show both its ammo and load + if(weapon_clipsize) + { + weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD); + if(weapon_clipload < 0) // we're reloading + { + ammo_pos_offset = '1 0 0' * stringwidth("- -", FALSE, '16 16 0') * 0.5; + drawstring(pos - '118 23 0' - ammo_pos_offset, "- -", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + } + else + { + ammo_pos_offset = '1 0 0' * stringwidth(ftos(weapon_clipload), FALSE, '16 16 0') * 0.5; + Sbar_DrawXNum(pos - '118 23 0' - ammo_pos_offset, weapon_clipload, 2, 0, 16, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + } + ammo_pos_offset = '1 0 0' * stringwidth(ftos(a), FALSE, '12 12 0') * 0.5; + Sbar_DrawXNum(pos - '118 7 0' - ammo_pos_offset, a, 3, 0, 12, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + } + else + { + ammo_pos_offset = '1 0 0' * stringwidth(ftos(a), FALSE, '16 16 0') * 0.5; + Sbar_DrawXNum(pos - '118 16 0' - ammo_pos_offset, a, 3, 0, 16, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + } + } + } + } + + // weapon icon + entity e; + e = get_weaponinfo(activeweapon); + if (e && e.netname != "" && e.netname != "N/A") + drawpic(bottom - '96 96 0', strcat("gfx/hud/bg_status_activeweapon_", e.netname), '192 96 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + + // draw scores, timer, and ring Sbar_Score(); Sbar_Timer(); + Sbar_Ring(); // draw strength/invincibility icon and timer CSQC_Strength_Timer(); @@ -3061,6 +3167,16 @@ void Sbar_Draw (void) CSQC_ctf_hud(); else if(gametype == GAME_CTS || gametype == GAME_RACE) CSQC_race_hud(); + + // draw the canleave message + if(getstati(STAT_VORE_CANLEAVE)) + if not(spectatee_status) // this message doesn't address spectated players + { + s = strcat("^7Press ^3", getcommandkey("jump", "+jump"), " ^7to exit"); + pos_x = bottom_x - stringwidth(s, TRUE, '0 0 0') * 16 / 2; + pos_y = bottom_y - 120; + drawcolorcodedstring(pos, s, '16 16 0', sbar_alpha_fg, DRAWFLAG_NORMAL); + } } return; }