HEIGHT_TITLE 1.45
HEIGHT_ZOOMEDTITLE -1
+// gametypelist
+BOOL_GAMETYPELIST_ICON_BLUR 0
+
// inputbox
COLOR_INPUTBOX_F '1 1 1'
COLOR_INPUTBOX_N '1 1 1'
COLOR_DIALOG_CVARS '1 0 0'
COLOR_DIALOG_HUDCONFIRM '1 0 0'
+// gametypelist
+BOOL_GAMETYPELIST_ICON_BLUR 1
+
// item: input box
// uses "inputbox" images
COLOR_INPUTBOX_N '1 1 1'
COLOR_DIALOG_CVARS '1 0 0'
COLOR_DIALOG_HUDCONFIRM '1 0 0'
+// gametypelist
+BOOL_GAMETYPELIST_ICON_BLUR 1
+
// item: input box
// uses "inputbox" images
COLOR_INPUTBOX_N '1 1 1'
COLOR_CVARLIST_UNCHANGED '1 1 1'
COLOR_CVARLIST_CONTROLS '1 0 0'
+// gametypelist
+BOOL_GAMETYPELIST_ICON_BLUR 1
+
// item: dialog
// uses "border" images
// uses "closebutton" images
// update generic hud functions
HUD_Panel_UpdateCvars();
- draw_beginBoldFont();
-
// figure out weapon order (how the weapons are sorted) // TODO make this configurable
if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0])
{
// might as well commit suicide now, no reason to live ;)
if (weapon_count == 0)
- {
- draw_endBoldFont();
return;
- }
vector old_panel_size = panel_size;
vector padded_panel_size = panel_size - '2 2 0' * panel_bg_padding;
HUD_Panel_DrawBg(1);
if(center.x == -1)
- {
- draw_endBoldFont();
return;
- }
if(panel_bg_padding)
{
}
}
}
-
- draw_endBoldFont();
}
// Ammo (#1)
}
HUD_Panel_UpdateCvars();
+
+ draw_beginBoldFont();
+
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", fuel/100, is_vertical, fuel_baralign, autocvar_hud_progressbar_fuel_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
}
}
+
+ draw_endBoldFont();
}
// Notification area (#4)
vector distribution_color;
entity tm, pl, me;
- me = playerslots[player_localentnum - 1];
+ me = playerslots[current_player];
if((scores_flags[ps_primary] & SFL_TIME) && !teamplay) { // race/cts record display on HUD
string timer, distrtimer;
HUD_Panel_UpdateCvars();
- draw_beginBoldFont();
-
vector pos, mySize;
pos = panel_pos;
mySize = panel_size;
if(autocvar__hud_configure)
{
s = "0:13:37";
+ draw_beginBoldFont();
drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, false, '0.60 0.60 0' * mySize.y), s, '0.60 0.60 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ draw_endBoldFont();
s = _("^1Intermediate 1 (+15.42)");
drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.20 * mySize.y) + eY * 0.60 * mySize.y, s, '1 1 0' * 0.20 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
s = sprintf(_("^1PENALTY: %.1f (%s)"), 2, "missing a checkpoint");
}
}
+ draw_beginBoldFont();
+
if(forcetime != "")
{
a = bound(0, (time - race_checkpointtime) / 0.5, 1);
s = TIME_ENCODED_TOSTRING(TIME_ENCODE(time + TIME_DECODE(race_penaltyaccumulator) - race_laptime));
drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, false, '0.6 0.6 0' * mySize.y), s, '0.6 0.6 0' * mySize.y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
}
+
+ draw_endBoldFont();
}
else
{
}
}
}
-
- draw_endBoldFont();
}
// Vote window (#9)
if(spectatee_status == -1)
s = _("^1Observing");
else
- s = sprintf(_("^1Spectating: ^7%s"), GetPlayerName(player_localentnum - 1));
+ s = sprintf(_("^1Spectating: ^7%s"), GetPlayerName(current_player));
drawInfoMessage(s);
if(spectatee_status == -1)
hud_skin_prev = strzone(autocvar_hud_skin);
}
- current_player = player_localentnum;
-
// draw the dock
if(autocvar_hud_dock != "" && autocvar_hud_dock != "0")
{
{
string hud_dock_color = autocvar_hud_dock_color;
if(hud_dock_color == "shirt") {
- f = stof(getplayerkeyvalue(current_player - 1, "colors"));
+ f = stof(getplayerkeyvalue(current_player, "colors"));
color = colormapPaletteColor(floor(f / 16), 0);
}
else if(hud_dock_color == "pants") {
- f = stof(getplayerkeyvalue(current_player - 1, "colors"));
+ f = stof(getplayerkeyvalue(current_player, "colors"));
color = colormapPaletteColor(f % 16, 1);
}
else
panel_bg_color = autocvar_hud_panel_bg_color; \
} else { \
if (panel_bg_color_str == "shirt") { \
- panel_bg_color = colormapPaletteColor(floor(stof(getplayerkeyvalue(current_player - 1, "colors")) / 16), 0);\
+ panel_bg_color = colormapPaletteColor(floor(stof(getplayerkeyvalue(current_player, "colors")) / 16), 0); \
} else if (panel_bg_color_str == "pants") { \
- panel_bg_color = colormapPaletteColor(stof(getplayerkeyvalue(current_player - 1, "colors")) % 16, 1);\
+ panel_bg_color = colormapPaletteColor(stof(getplayerkeyvalue(current_player, "colors")) % 16, 1); \
} else { \
panel_bg_color = stov(panel_bg_color_str); \
} \
hud_fontsize = HUD_GetFontsize("hud_fontsize");
- draw_beginBoldFont();
for(i = 1; i < argc - 1; ++i)
{
float nocomplain;
}
hud_field[hud_num_fields] = SP_END;
- draw_endBoldFont();
}
// MOVEUP::
}
// print the strings of the columns headers and draw the columns
- draw_beginBoldFont();
int i;
for(i = 0; i < hud_num_fields; ++i)
{
pos.x -= hud_fontsize.x;
}
}
- draw_endBoldFont();
pos.x = xmin;
pos.y += 1.25 * hud_fontsize.y; // skip the header
CSQCPlayer_SetCamera();
- myteam = GetPlayerColor(player_localentnum - 1);
+ if(player_localentnum <= maxclients) // is it a client?
+ current_player = player_localentnum - 1;
+ else // then player_localentnum is the vehicle I'm driving
+ current_player = player_localnum;
+ myteam = GetPlayerColor(current_player);
if(myteam != prev_myteam)
{
SKINVECTOR(COLOR_CLEARBUTTON_F, '1 1 1');
SKINVECTOR(COLOR_CLEARBUTTON_C, '1 1 1');
+ // item: gametype list
+ SKINFLOAT(BOOL_GAMETYPELIST_ICON_BLUR, 1);
+
// item: key grabber
SKINVECTOR(COLOR_KEYGRABBER_TITLES, '1 1 1');
SKINFLOAT(ALPHA_KEYGRABBER_TITLES, 1);
SKINVECTOR(COLOR_SERVERLIST_FAVORITE, '1 1 1');
SKINFLOAT(ALPHA_SERVERLIST_IMPOSSIBLE, 0.7);
SKINVECTOR(COLOR_SERVERLIST_IMPOSSIBLE, '0.3 0.3 0.3');
- SKINSTRING(GFX_SERVERLIST_ICON, "icon");
SKINFLOAT(ALPHA_SERVERLIST_ICON_NONPURE, 0.5);
// item: server info
me.configureXonoticListBox(me);
me.nItems = GameType_GetCount();
- // we want the pics mipmapped
- for(int i = 0; i < GameType_GetCount(); ++i)
- draw_PreloadPictureWithFlags(GameType_GetIcon(i), PRECACHE_PIC_MIPMAP);
+ if(SKINBOOL_GAMETYPELIST_ICON_BLUR)
+ {
+ for(int i = 0; i < GameType_GetCount(); ++i)
+ draw_PreloadPictureWithFlags(GameType_GetIcon(i), PRECACHE_PIC_MIPMAP);
+ }
me.loadCvars(me);
}
iconPos_x = (me.columnIconsSize - 3 * iconSize.x) * 0.5;
iconPos_y = (1 - iconSize.y) * 0.5;
- string n;
-
- if (!(me.seenIPv4 && me.seenIPv6))
- {
- iconPos.x += iconSize.x * 0.5;
- }
- else if(me.seenIPv4 && me.seenIPv6)
+ // IP
+ if(me.seenIPv4 && me.seenIPv6)
{
- n = string_null;
if(isv6)
- draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_ipv6"), 0); // PRECACHE_PIC_MIPMAP
+ draw_Picture(iconPos, "icon_ipv6", iconSize, '1 1 1', 1);
else if(isv4)
- draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_ipv4"), 0); // PRECACHE_PIC_MIPMAP
- if(n)
- draw_Picture(iconPos, n, iconSize, '1 1 1', 1);
- iconPos.x += iconSize.x;
+ draw_Picture(iconPos, "icon_ipv4", iconSize, '1 1 1', 1);
}
+ iconPos.x += iconSize.x;
+
+ // AES
if(q > 0)
- {
- draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_aeslevel", ftos(q)), 0); // PRECACHE_PIC_MIPMAP
- draw_Picture(iconPos, n, iconSize, '1 1 1', 1);
- }
+ draw_Picture(iconPos, strcat("icon_aeslevel", ftos(q)), iconSize, '1 1 1', 1);
+
iconPos.x += iconSize.x;
+ // Mod
if(modname == "Xonotic")
{
if(pure == 0)
- {
- draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_pure1"), PRECACHE_PIC_MIPMAP);
- draw_Picture(iconPos, n, iconSize, '1 1 1', 1);
- }
+ draw_Picture(iconPos, "icon_pure1", iconSize, '1 1 1', 1);
}
else
{
- draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_mod_", modname), PRECACHE_PIC_MIPMAP);
- if(draw_PictureSize(n) == '0 0 0')
- draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_mod_"), PRECACHE_PIC_MIPMAP);
+ string icon = strcat("icon_mod_", modname);
+ if(draw_PictureSize(icon) == '0 0 0')
+ icon = "icon_mod_";
+
if(pure == 0)
- draw_Picture(iconPos, n, iconSize, '1 1 1', 1);
+ draw_Picture(iconPos, icon, iconSize, '1 1 1', 1);
else
- draw_Picture(iconPos, n, iconSize, '1 1 1', SKINALPHA_SERVERLIST_ICON_NONPURE);
+ draw_Picture(iconPos, icon, iconSize, '1 1 1', SKINALPHA_SERVERLIST_ICON_NONPURE);
}
+
iconPos.x += iconSize.x;
+ // Stats
if(sflags >= 0 && (sflags & SERVERFLAG_PLAYERSTATS))
- {
- draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_stats1"), 0); // PRECACHE_PIC_MIPMAP
- draw_Picture(iconPos, n, iconSize, '1 1 1', 1);
- }
- iconPos.x += iconSize.x;
+ draw_Picture(iconPos, "icon_stats1", iconSize, '1 1 1', 1);
// --------------
// RENDER TEXT