for(fieldcounter = 1; fieldcounter <= field_number; ++fieldcounter)\r
{\r
field = -fieldcounter;\r
- if(field == SP_SEPARATOR)\r
- break;\r
-\r
str = Sbar_GetStomachField(pl, field);\r
\r
// row highlighting\r
drawpic(pos, "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, str, '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawcolorcodedstring(pos, textShortenToWidth(str, 138, '11 11 0', stringwidth_colors), '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
\r
if(field == ST_HEALTH)\r
for(fieldcounter2 = 1; fieldcounter2 <= field_number; ++fieldcounter2)\r
{\r
field = -fieldcounter2;\r
- if(field == SP_SEPARATOR)\r
- break;\r
-\r
str = Sbar_GetStomachFieldPred(pl, field);\r
\r
if(field == STP_NAME) {\r
drawpic(pos, "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, str, '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawcolorcodedstring(pos, textShortenToWidth(str, 122, '11 11 0', stringwidth_colors), '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
}\r
}\r