}\r
\r
float fieldcounter;\r
-void Sbar_PrintStomachboardItem(vector pos, entity pl)\r
+void Sbar_PrintStomachboardItem(entity pl, vector position, vector dimensions)\r
{\r
// lists all players in the stomach\r
\r
\r
for(fieldcounter = 1; fieldcounter <= field_number; ++fieldcounter)\r
{\r
+ vector pos, sz;\r
field = -fieldcounter;\r
str = Sbar_GetStomachField(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
}\r
else\r
hl_color = stov(cvar_string("sbar_stomachboard_color1"));\r
- drawfill(pos - '0 0 0', '193 11 0', hl_color, cvar("sbar_stomachboard_highlight_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawfill(pos, sz, hl_color, cvar("sbar_stomachboard_highlight_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
\r
if(field == ST_NAME) {\r
+ pos_x = position_x / 9;\r
+ sz_x = dimensions_x / 9;\r
+\r
f = stof(getplayerkey(pl.sv_entnum, "colors"));\r
- drawpic(pos, "gfx/sb_playercolor_base", '22 11 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos, "gfx/sb_playercolor_shirt", '22 11 0', colormapPaletteColor(floor(f / 16), 0), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos, "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(pos, textShortenToWidth(str, 138, '11 11 0', stringwidth_colors), '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ pos_x = position_x / 4;\r
+ sz_x = dimensions_x / 4;\r
+ drawcolorcodedstring(pos, textShortenToWidth(str, sz_x, '1 1 0' * sz_y, stringwidth_colors), '1 1 0' * sz_y, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
\r
if(field == ST_HEALTH) {\r
- pos_x += 138;\r
- if(pl.sv_entnum == player_localentnum - 1 || (spectatee_status && pl.sv_entnum == spectatee_status - 1))\r
- drawcolorcodedstring(pos, "self", '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- else\r
- {\r
- drawpic(pos, "gfx/hud/sb_health", '11 11 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ pos_x = position_x / 1.05;\r
+ sz_x = sz_y = dimensions_y;\r
\r
- pos_x += 9;\r
- drawcolorcodedstring(pos, str, '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- }\r
+ if(pl.sv_entnum == player_localentnum - 1 || (spectatee_status && pl.sv_entnum == spectatee_status - 1))\r
+ drawcolorcodedstring(pos, "self", sz, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ else\r
+ {\r
+ drawpic(pos, "gfx/hud/sb_health", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+\r
+ pos_x = position_x / 1.05;\r
+ sz_x = sz_y = dimensions_y;\r
+ drawcolorcodedstring(pos, str, sz, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ }\r
}\r
}\r
}\r
\r
float fieldcounter2;\r
-void Sbar_PrintStomachboardItemPred(vector pos, entity pl)\r
+void Sbar_PrintStomachboardItemPred(entity pl, vector position, vector dimensions)\r
{\r
// shows the name of our predator\r
\r
\r
if(field == STP_NAME) {\r
f = stof(getplayerkey(pl.sv_entnum, "colors"));\r
- drawpic(pos, "gfx/sb_playercolor_base", '22 11 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos, "gfx/sb_playercolor_shirt", '22 11 0', colormapPaletteColor(floor(f / 16), 0), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos, "gfx/sb_playercolor_pants", '22 11 0', colormapPaletteColor(mod(f, 16), 1), sbar_alpha_fg, DRAWFLAG_NORMAL);\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
\r
- pos_x += 24;\r
- drawcolorcodedstring(pos, textShortenToWidth(str, 122, '11 11 0', stringwidth_colors), '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ //pos_x += 24;\r
+ drawcolorcodedstring(position, textShortenToWidth(str, 122, '11 11 0', stringwidth_colors), '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
}\r
}\r
{\r
if(l <= 8) // limit the stomach board to 9 entries due to the HUD design\r
{\r
- Sbar_PrintStomachboardItem(pos - '-16 124 0', pl);\r
+ Sbar_PrintStomachboardItem(pl, stov(cvar_string("hud_item_preylist_position")), stov(cvar_string("hud_item_preylist_scale")));\r
pos_y += 1.1 * sbar_fontsize_y;\r
l += 1;\r
}\r
}\r
\r
// draw the predator's name\r
- Sbar_PrintStomachboardItemPred(bottomleft - '-76 150 0', pred);\r
+// Sbar_PrintStomachboardItemPred(bottomleft - '-76 150 0', pred);\r
}\r
\r
// draw status, scores, timer, ring and portrait\r