- // go back to the top to make alternated columns highlighting and to print the strings
- pos.y -= 1.25 * hud_fontsize.y;
-
- if (sbt_highlight)
- column_dim.y = panel_size.y;
-
- // print the strings of the columns headers and draw the columns
- int i;
- vector text_offset = (1.25 - 1) / 2 * hud_fontsize.y * eY;
- for(i = 0; i < sbt_num_fields; ++i)
- {
- if(sbt_field[i] == SP_SEPARATOR)
- break;
- column_dim.x = sbt_field_size[i] + hud_fontsize.x;
- if (sbt_highlight)
- {
- if (i % 2)
- drawfill(pos - eX * hud_fontsize.x * 0.5, column_dim, '0 0 0', sbt_highlight_alpha, DRAWFLAG_NORMAL);
- }
- drawstring(pos + text_offset, sbt_field_title[i], hud_fontsize, rgb * 1.5, sbt_fg_alpha, DRAWFLAG_NORMAL);
- pos.x += column_dim.x;
- }
- if(sbt_field[i] == SP_SEPARATOR)
- {
- pos.x = panel_pos.x + panel_size.x;
- tmp.y = text_offset.y;
- for(i = sbt_num_fields - 1; i > 0; --i)
- {
- if(sbt_field[i] == SP_SEPARATOR)
- break;
-
- pos.x -= sbt_field_size[i];
-
- if (sbt_highlight)
- {
- if (!(i % 2))
- {
- if (i == sbt_num_fields-1)
- column_dim.x = sbt_field_size[i] + hud_fontsize.x * 0.5;
- else
- column_dim.x = sbt_field_size[i] + hud_fontsize.x;
- if(i == sbt_num_fields - 1)
- drawfill(pos - eX * hud_fontsize.x * 0.5, column_dim, '0 0 0', sbt_highlight_alpha, DRAWFLAG_NORMAL);
- else
- drawfill(pos - eX * hud_fontsize.x * 0.5, column_dim, '0 0 0', sbt_highlight_alpha, DRAWFLAG_NORMAL);
- }
- }
-
- tmp.x = stringwidth(sbt_field_title[i], false, hud_fontsize);
- tmp.x = (sbt_field_size[i] - tmp.x);
- drawstring(pos + tmp, sbt_field_title[i], hud_fontsize, rgb * 1.5, sbt_fg_alpha, DRAWFLAG_NORMAL);
- pos.x -= hud_fontsize.x;
- }
- }
-
- pos.x = panel_pos.x;
- pos.y += 1.25 * hud_fontsize.y; // skip the header