// center defined position on the x axis\r
position_x -= dimensions_x / 2;\r
\r
- // limit the font size to the maximum of the HUD\r
+ // set font size to the height of each entry\r
vector font_sz;\r
- font_sz_x = bound(0, sbar_fontsize_x, dimensions_y);\r
- font_sz_y = bound(0, sbar_fontsize_y, dimensions_y);\r
+ font_sz_x = font_sz_y = dimensions_y;\r
\r
for(fieldcounter = 1; fieldcounter <= field_number; ++fieldcounter)\r
{\r
\r
string str;\r
float f, field, field_number;\r
- field_number = 1; // the number of components each row has\r
+ vector hl_color;\r
+ field_number = 2; // the number of components each row has\r
+\r
+ // center defined position on the x axis\r
+ position_x -= dimensions_x / 2;\r
+\r
+ // set font size to the height of each entry\r
+ vector font_sz;\r
+ font_sz_x = font_sz_y = dimensions_y;\r
\r
for(fieldcounter2 = 1; fieldcounter2 <= field_number; ++fieldcounter2)\r
{\r
+ vector pos, sz;\r
field = -fieldcounter2;\r
str = Sbar_GetStomachFieldPred(pl, field);\r
\r
+ // row highlighting\r
+ if(field == ST_HIGHLIGHT)\r
+ {\r
+ pos = position;\r
+ sz = dimensions;\r
+\r
+ if(getstati(STAT_VORE_EATEN))\r
+ {\r
+ if(teamplay && (GetPlayerColor(getstati(STAT_VORE_EATEN) - 1) == GetPlayerColor(player_localentnum - 1) || GetPlayerColor(getstati(STAT_VORE_EATEN) - 1) == GetPlayerColor(spectatee_status - 1))) // same team\r
+ hl_color = stov(cvar_string("sbar_stomachboard_color2"));\r
+ else\r
+ hl_color = stov(cvar_string("sbar_stomachboard_color3"));\r
+ }\r
+ else\r
+ hl_color = stov(cvar_string("sbar_stomachboard_color1"));\r
+ drawfill(pos, sz, hl_color, cvar("sbar_stomachboard_highlight_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ }\r
+\r
if(field == STP_NAME) {\r
+ pos_x = position_x + dimensions_x * cvar("hud_item_predator_colors_location");\r
+ sz_x = dimensions_x * cvar("hud_item_predator_colors_length");\r
f = stof(getplayerkey(pl.sv_entnum, "colors"));\r
- drawpic(position, "gfx/sb_playercolor_base", '22 11 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(position, "gfx/sb_playercolor_shirt", '22 11 0', colormapPaletteColor(floor(f / 16), 0), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(position, "gfx/sb_playercolor_pants", '22 11 0', colormapPaletteColor(mod(f, 16), 1), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, "gfx/sb_playercolor_base", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, "gfx/sb_playercolor_shirt", sz, colormapPaletteColor(floor(f / 16), 0), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, "gfx/sb_playercolor_pants", sz, colormapPaletteColor(mod(f, 16), 1), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
- //pos_x += 24;\r
- drawcolorcodedstring(position, textShortenToWidth(str, 122, '11 11 0', stringwidth_colors), '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ pos_x = position_x + dimensions_x * cvar("hud_item_predator_name_location");\r
+ sz_x = dimensions_x * cvar("hud_item_predator_name_length");\r
+ drawcolorcodedstring(pos, textShortenToWidth(str, sz_x, font_sz, stringwidth_colors), font_sz, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
}\r
}\r
}\r
\r
// draw the predator's name\r
-// Sbar_PrintStomachboardItemPred(bottomleft - '-76 150 0', pred);\r
+ Sbar_PrintStomachboardItemPred(pred, stov(cvar_string("hud_item_predator_position")), stov(cvar_string("hud_item_predator_scale")));\r
}\r
\r
// draw status, scores, timer, ring and portrait\r