seta hud_panel_buffs_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
seta hud_panel_buffs_bg_border "" "if set to something else than \"\" = override default size of border around the background"
seta hud_panel_buffs_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
+
+seta hud_panel_mapvote "" "enable/disable this panel"
+seta hud_panel_mapvote_pos "" "position of this panel"
+seta hud_panel_mapvote_size "" "size of this panel"
+seta hud_panel_mapvote_bg "" "if set to something else than \"\" = override default background"
+seta hud_panel_mapvote_bg_color "" "if set to something else than \"\" = override default panel background color"
+seta hud_panel_mapvote_bg_color_team "" "override panel color with team color in team based games"
+seta hud_panel_mapvote_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
+seta hud_panel_mapvote_bg_border "" "if set to something else than \"\" = override default size of border around the background"
+seta hud_panel_mapvote_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
seta hud_progressbar_acceleration_color "0.2 0.65 0.93"
seta hud_progressbar_acceleration_neg_color "0.86 0.35 0"
-seta _hud_panelorder "15 12 9 5 10 6 14 0 7 4 11 2 1 3 8 13 16 "
+seta _hud_panelorder "17 15 12 9 5 10 6 14 0 7 4 11 2 1 3 8 13 16 "
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.005000"
seta hud_panel_buffs_bg_border ""
seta hud_panel_buffs_bg_padding ""
+seta hud_panel_mapvote 1
+seta hud_panel_mapvote_pos "0 0"
+seta hud_panel_mapvote_size "1 1"
+seta hud_panel_mapvote_bg "border_default"
+seta hud_panel_mapvote_bg_color ""
+seta hud_panel_mapvote_bg_color_team ""
+seta hud_panel_mapvote_bg_alpha ""
+seta hud_panel_mapvote_bg_border ""
+seta hud_panel_mapvote_bg_padding ""
+
menu_sync
seta hud_progressbar_acceleration_color "0.5 0.75 1"
seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
-seta _hud_panelorder "15 12 9 10 5 6 14 0 7 4 11 2 1 3 8 13 16 "
+seta _hud_panelorder "17 15 12 9 10 5 6 14 0 7 4 11 2 1 3 8 13 16 "
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.010000"
seta hud_panel_buffs_bg_border ""
seta hud_panel_buffs_bg_padding ""
+seta hud_panel_mapvote 1
+seta hud_panel_mapvote_pos "0 0"
+seta hud_panel_mapvote_size "1 1"
+seta hud_panel_mapvote_bg "0"
+seta hud_panel_mapvote_bg_color ""
+seta hud_panel_mapvote_bg_color_team ""
+seta hud_panel_mapvote_bg_alpha ""
+seta hud_panel_mapvote_bg_border ""
+seta hud_panel_mapvote_bg_padding ""
+
menu_sync
seta hud_progressbar_acceleration_color "0.5 0.75 1"
seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
-seta _hud_panelorder "10 3 0 14 6 9 13 4 1 2 11 12 7 5 8 15 16 "
+seta _hud_panelorder "17 10 3 0 14 6 9 13 4 1 2 11 12 7 5 8 15 16 "
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.010000"
seta hud_panel_buffs_bg_border ""
seta hud_panel_buffs_bg_padding ""
+seta hud_panel_mapvote 1
+seta hud_panel_mapvote_pos "0 0"
+seta hud_panel_mapvote_size "1 1"
+seta hud_panel_mapvote_bg "0"
+seta hud_panel_mapvote_bg_color ""
+seta hud_panel_mapvote_bg_color_team ""
+seta hud_panel_mapvote_bg_alpha ""
+seta hud_panel_mapvote_bg_border ""
+seta hud_panel_mapvote_bg_padding ""
+
menu_sync
seta hud_progressbar_acceleration_color "0.5 0.75 1"
seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
-seta _hud_panelorder "15 3 1 2 11 10 0 14 6 9 13 4 12 7 5 8 16 "
+seta _hud_panelorder "17 15 3 1 2 11 10 0 14 6 9 13 4 12 7 5 8 16 "
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.010000"
seta hud_panel_buffs_bg_border ""
seta hud_panel_buffs_bg_padding ""
+seta hud_panel_mapvote 1
+seta hud_panel_mapvote_pos "0 0"
+seta hud_panel_mapvote_size "1 1"
+seta hud_panel_mapvote_bg "0"
+seta hud_panel_mapvote_bg_color ""
+seta hud_panel_mapvote_bg_color_team ""
+seta hud_panel_mapvote_bg_alpha ""
+seta hud_panel_mapvote_bg_border ""
+seta hud_panel_mapvote_bg_padding ""
+
menu_sync
seta hud_progressbar_acceleration_color "0.5 0.75 1"
seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
-seta _hud_panelorder "15 10 9 6 8 14 5 0 4 13 2 7 1 3 11 12 16 "
+seta _hud_panelorder "17 15 10 9 6 8 14 5 0 4 13 2 7 1 3 11 12 16 "
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.010000"
seta hud_panel_buffs_bg_border ""
seta hud_panel_buffs_bg_padding ""
+seta hud_panel_mapvote 1
+seta hud_panel_mapvote_pos "0 0"
+seta hud_panel_mapvote_size "1 1"
+seta hud_panel_mapvote_bg "0"
+seta hud_panel_mapvote_bg_color ""
+seta hud_panel_mapvote_bg_color_team ""
+seta hud_panel_mapvote_bg_alpha ""
+seta hud_panel_mapvote_bg_border ""
+seta hud_panel_mapvote_bg_padding ""
+
menu_sync
seta hud_progressbar_acceleration_color "0.5 0.75 1"
seta hud_progressbar_acceleration_neg_color "0.125 0.25 0.5"
-seta _hud_panelorder "15 0 11 8 5 6 14 9 13 7 2 3 1 10 12 4 16 "
+seta _hud_panelorder "17 15 0 11 8 5 6 14 9 13 7 2 3 1 10 12 4 16 "
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.01"
seta hud_panel_buffs_bg_border ""
seta hud_panel_buffs_bg_padding ""
+seta hud_panel_mapvote 1
+seta hud_panel_mapvote_pos "0 0"
+seta hud_panel_mapvote_size "1 1"
+seta hud_panel_mapvote_bg "0"
+seta hud_panel_mapvote_bg_color ""
+seta hud_panel_mapvote_bg_color_team ""
+seta hud_panel_mapvote_bg_alpha ""
+seta hud_panel_mapvote_bg_border ""
+seta hud_panel_mapvote_bg_padding ""
+
menu_sync
vector color;
// check to see if we want to continue
- if(hud != HUD_NORMAL) { return; }
+ if(intermission == 2) return;
+ if(hud != HUD_NORMAL) return;
if(!autocvar__hud_configure)
{
float nade_statuschange_time;
void HUD_Ammo(void)
{
+ if(intermission == 2) return;
if(hud != HUD_NORMAL) return;
if(!autocvar__hud_configure)
{
void HUD_Powerups(void)
{
float strength_time, shield_time, superweapons_time;
+ if(intermission == 2) return;
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_powerups) return;
void HUD_HealthArmor(void)
{
int armor, health, fuel;
+ if(intermission == 2) return;
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_healtharmor) return;
void HUD_Notify(void)
{
+ if(intermission == 2) return;
if (!autocvar__hud_configure)
if (!autocvar_hud_panel_notify)
return;
void HUD_Timer(void)
{
+ if(intermission == 2) return;
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_timer) return;
//
void HUD_Radar(void)
{
+ if(intermission == 2) return;
if (!autocvar__hud_configure)
{
if (hud_panel_radar_maximized)
void HUD_Score(void)
{
+ if(intermission == 2) return;
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_score) return;
//
void HUD_RaceTimer (void)
{
+ if(intermission == 2) return;
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_racetimer) return;
void HUD_Vote(void)
{
+ if(intermission == 2) return;
if(autocvar_cl_allow_uid2name == -1 && (gametype == MAPINFO_TYPE_CTS || gametype == MAPINFO_TYPE_RACE || (serverflags & SERVERFLAG_PLAYERSTATS)))
{
vote_active = 1;
void HUD_ModIcons(void)
{
+ if(intermission == 2) return;
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_modicons) return;
//
void HUD_PressedKeys(void)
{
+ if(intermission == 2) return;
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_pressedkeys) return;
//
void HUD_Chat(void)
{
+ //if(intermission == 2) return;
if(!autocvar__hud_configure)
{
if (!autocvar_hud_panel_chat)
float frametimeavg2; // 2 frames ago
void HUD_EngineInfo(void)
{
+ //if(intermission == 2) return;
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_engineinfo) return;
} while(0)
void HUD_InfoMessages(void)
{
+ if(intermission == 2) return;
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_infomessages) return;
float physics_update_time, discrete_speed, discrete_acceleration;
void HUD_Physics(void)
{
+ if(intermission == 2) return;
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_physics) return;
float hud_configure_cp_generation_time;
void HUD_CenterPrint (void)
{
+ if(intermission == 2) return;
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_centerprint) return;
//
void HUD_Buffs(void)
{
+ if(intermission == 2) return;
int buffs = getstati(STAT_BUFFS, 0, 24);
if(!autocvar__hud_configure)
{
HUD_Configure_Frame();
- if(intermission == 2) // no hud during mapvote
- hud_fade_alpha = 0;
-
// panels that we want to be active together with the scoreboard
// they must fade only when the menu does
if(scoreboard_fade_alpha == 1)
}
hud_draw_maximized = 0;
- // draw panels in order specified by panel_order array
+ // draw panels in the order specified by panel_order array
for(i = HUD_PANEL_NUM - 1; i >= 0; --i)
(panel = hud_panel[panel_order[i]]).panel_draw();
HUD_PANEL(INFOMESSAGES , HUD_InfoMessages , infomessages) \
HUD_PANEL(PHYSICS , HUD_Physics , physics) \
HUD_PANEL(CENTERPRINT , HUD_CenterPrint , centerprint) \
- HUD_PANEL(BUFFS , HUD_Buffs , buffs)
+ HUD_PANEL(BUFFS , HUD_Buffs , buffs) \
+ HUD_PANEL(MAPVOTE , MapVote_Draw , mapvote) \
+ // always add new panels to the end of list
#define HUD_PANEL(NAME, draw_func, name) \
int HUD_PANEL_##NAME; \
float rows;
vector dist = '0 0 0';
+ //if(intermission != 2) return;
if(!mv_active)
return;
if(mv_abstain)
mv_num_maps -= 1;
+ HUD_Panel_UpdateCvars();
+
// higher than the image itself ratio for mapvote items to reserve space for long map names
int item_aspect = (gametypevote) ? 3/1 : 5/3;
vector table_size = HUD_GetTableSize_BestItemAR(mv_num_maps, eX * (xmax - xmin) + eY * (ymax - ymin), item_aspect);
offset = ((ymax - pos.y) - dist.y * rows) / 2;
ymax -= 2 * offset;
+ // override panel_pos and panel_size
+ panel_pos.x = pos.x;
+ panel_pos.y = pos.y;
+ panel_size.x = xmax - xmin;
+ panel_size.y = ymax - ymin;
+ HUD_Panel_DrawBg(1);
+
+ if(panel_bg_padding)
+ {
+ // FIXME item AR gets slightly changed here...
+ // it's rather hard to avoid it at this point
+ dist.x -= 2 * panel_bg_padding / mv_columns;
+ dist.y -= 2 * panel_bg_padding / rows;
+ xmin = pos.x += panel_bg_padding;
+ ymin = pos.y += panel_bg_padding;
+ xmax -= 2 * panel_bg_padding;
+ ymax -= 2 * panel_bg_padding;
+ }
+
mv_selection = MapVote_Selection(pos, dist, rows, mv_columns);
if (mv_top2_time)
void drawpic_aspect_skin_expanding_two(vector position, string pic, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp);
+// FIXME this function isn't centering the text correctly, see vote panel
#define SET_POS_AND_SZ_Y_ASPECT(allow_colors) do { \
float textaspect, oldsz; \
textaspect = stringwidth(text, allow_colors, '1 1 1' * sz.y) / sz.y; \
HUD_Main(); // always run these functions for alpha checks
HUD_DrawScoreboard();
- if (scoreboard_active) // scoreboard/accuracy
+ // scoreboard/accuracy, map/gametype voting screen
+ if (scoreboard_active || intermission == 2)
HUD_Reset();
- else if (intermission == 2) // map voting screen
- {
- MapVote_Draw();
- HUD_Reset();
- }
}