seta hud_vote_bg_border 0 "if set to something else than 0 = override size of border around the background"
seta hud_vote_bg_padding 0 "padding of contents from border"
+seta hud_modicons 0 "enable/disable this panel"
+seta hud_modicons_pos "-0.571569 -0.265625" "position of this base of the panel"
+seta hud_modicons_size "0.145098 0.114105" "size of this panel"
+seta hud_modicons_bg "" "if set to something else than \"\" = override default background, if set to 0 = disable background"
+seta hud_modicons_bg_color "" "optional R G B string of the background color, otherwise use hud default"
+seta hud_modicons_bg_alpha 0 "if set to something else than 0 = override default alpha"
+seta hud_modicons_bg_border 0 "if set to something else than 0 = override size of border around the background"
+seta hud_modicons_bg_padding 0 "padding of contents from border"
+
seta hud_pressedkeys 1 "enable/disable this panel"
seta hud_pressedkeys_pos "-0.571569 -0.265625" "position of this base of the panel"
seta hud_pressedkeys_size "0.145098 0.114105" "size of this panel"
}
}
-// Draw pressed keys (#11)
+// Mod icons/awards panel (#10)
//
-void HUD_DrawPressedKeys(void)
-{
- float id = 11;
- vector pos, mySize;
- pos = HUD_Panel_GetPos(id);
- mySize = HUD_Panel_GetSize(id);
- HUD_Panel_DrawBg(id, pos, mySize);
- float padding;
- padding = cvar(strcat("hud_", HUD_Panel_GetName(id), "_bg_padding"));
- if(padding)
- {
- pos += '1 1 0' * padding;
- mySize -= '2 2 0' * padding;
- }
-
- float pressedkeys;
-
- pressedkeys = getstatf(STAT_PRESSED_KEYS);
- drawpic_skin(pos, "key_bg.tga", mySize, '1 1 1', 0.1 * hud_alpha_fg, DRAWFLAG_NORMAL);
- drawpic_skin(pos + eX * mySize_x - eX * 0.22 * mySize_x + eY * 0.195 * mySize_y, ((pressedkeys & KEY_CROUCH) ? "key_crouch_inv.tga" : "key_crouch.tga"), '1 1 0' * (1/3) * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
- drawpic_skin(pos + eX * 0.5 * mySize_x - eX * 0.23 * mySize_y + eY * 0.040 * mySize_y, ((pressedkeys & KEY_FORWARD) ? "key_forward_inv.tga" : "key_forward.tga"), '1 1 0' * 0.46 * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
- drawpic_skin(pos + eX * 0.023 * mySize_x + eY * 0.195 * mySize_y, ((pressedkeys & KEY_JUMP) ? "key_jump_inv.tga" : "key_jump.tga"), '1 1 0' * (1/3) * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
- drawpic_skin(pos + eX * 0.1 * mySize_x + eY * 0.486 * mySize_y, ((pressedkeys & KEY_LEFT) ? "key_left_inv.tga" : "key_left.tga"), '1 1 0' * 0.46 * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
- drawpic_skin(pos + eX * 0.5 * mySize_x - eX * 0.23 * mySize_y + eY * 0.486 * mySize_y, ((pressedkeys & KEY_BACKWARD) ? "key_backward_inv.tga" : "key_backward.tga"), '1 1 0' * 0.46 * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
- drawpic_skin(pos + eX * mySize_x - eX * 0.372 * mySize_x + eY * 0.486 * mySize_y, ((pressedkeys & KEY_RIGHT) ? "key_right_inv.tga" : "key_right.tga"), '1 1 0' * 0.46 * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
-}
-
-// Awards system
float race_status_time;
float race_status_prev;
string race_status_name_prev;
drawfont = hud_font;
}
+void HUD_ModIcons(void)
+{
+ float id = 10;
+ vector pos, mySize;
+ pos = HUD_Panel_GetPos(id);
+ mySize = HUD_Panel_GetSize(id);
+
+ HUD_Panel_DrawBg(id, pos, mySize);
+ float padding;
+ padding = cvar(strcat("hud_", HUD_Panel_GetName(id), "_bg_padding"));
+ if(padding)
+ {
+ pos += '1 1 0' * padding;
+ mySize -= '2 2 0' * padding;
+ }
+}
+
+// Draw pressed keys (#11)
+//
+void HUD_DrawPressedKeys(void)
+{
+ float id = 11;
+ vector pos, mySize;
+ pos = HUD_Panel_GetPos(id);
+ mySize = HUD_Panel_GetSize(id);
+
+ HUD_Panel_DrawBg(id, pos, mySize);
+ float padding;
+ padding = cvar(strcat("hud_", HUD_Panel_GetName(id), "_bg_padding"));
+ if(padding)
+ {
+ pos += '1 1 0' * padding;
+ mySize -= '2 2 0' * padding;
+ }
+
+ float pressedkeys;
+
+ pressedkeys = getstatf(STAT_PRESSED_KEYS);
+ drawpic_skin(pos, "key_bg.tga", mySize, '1 1 1', 0.1 * hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawpic_skin(pos + eX * mySize_x - eX * 0.22 * mySize_x + eY * 0.195 * mySize_y, ((pressedkeys & KEY_CROUCH) ? "key_crouch_inv.tga" : "key_crouch.tga"), '1 1 0' * (1/3) * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawpic_skin(pos + eX * 0.5 * mySize_x - eX * 0.23 * mySize_y + eY * 0.040 * mySize_y, ((pressedkeys & KEY_FORWARD) ? "key_forward_inv.tga" : "key_forward.tga"), '1 1 0' * 0.46 * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawpic_skin(pos + eX * 0.023 * mySize_x + eY * 0.195 * mySize_y, ((pressedkeys & KEY_JUMP) ? "key_jump_inv.tga" : "key_jump.tga"), '1 1 0' * (1/3) * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawpic_skin(pos + eX * 0.1 * mySize_x + eY * 0.486 * mySize_y, ((pressedkeys & KEY_LEFT) ? "key_left_inv.tga" : "key_left.tga"), '1 1 0' * 0.46 * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawpic_skin(pos + eX * 0.5 * mySize_x - eX * 0.23 * mySize_y + eY * 0.486 * mySize_y, ((pressedkeys & KEY_BACKWARD) ? "key_backward_inv.tga" : "key_backward.tga"), '1 1 0' * 0.46 * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawpic_skin(pos + eX * mySize_x - eX * 0.372 * mySize_x + eY * 0.486 * mySize_y, ((pressedkeys & KEY_RIGHT) ? "key_right_inv.tga" : "key_right.tga"), '1 1 0' * 0.46 * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+}
+
/*
==================
Main HUD system