X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud.qc;h=d5f74f22a726c64ecf2c721b8aac958446b62614;hp=252142506f88731b28e21e679c0bd5d84b7d52b2;hb=d83e03a366494037c020f4cebf474325de88e69e;hpb=e23579dcf3caf46f7d186bfc4b641458b36b5365 diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 252142506f..d5f74f22a7 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -264,8 +264,8 @@ HUD panels // draw the background/borders #define HUD_Panel_DrawBg(theAlpha)\ -if(panel_bg != "0" && panel_bg != "")\ - draw_BorderPicture(panel_pos - '1 1 0' * panel_bg_border, panel_bg, panel_size + '1 1 0' * 2 * panel_bg_border, panel_bg_color, panel_bg_alpha * theAlpha, '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER)) +if(panel.current_panel_bg != "0" && panel.current_panel_bg != "")\ + draw_BorderPicture(panel_pos - '1 1 0' * panel_bg_border, panel.current_panel_bg, panel_size + '1 1 0' * 2 * panel_bg_border, panel_bg_color, panel_bg_alpha * theAlpha, '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER)) //basically the same code of draw_ButtonPicture and draw_VertButtonPicture for the menu void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, float vertical, float baralign, vector theColor, float theAlpha, float drawflag) @@ -489,7 +489,6 @@ void HUD_Weapons(void) // update generic hud functions HUD_Panel_UpdateCvars(); - HUD_Panel_ApplyFadeAlpha(); draw_beginBoldFont(); @@ -941,7 +940,7 @@ void DrawAmmoItem(vector myPos, vector mySize, float itemcode, float currently_s void HUD_Ammo(void) { - if(hud != HUD_NORMAL) return; + if(hud != HUD_NORMAL) return; if(!autocvar__hud_configure) { if(!autocvar_hud_panel_ammo) return; @@ -949,7 +948,6 @@ void HUD_Ammo(void) } HUD_Panel_UpdateCvars(); - HUD_Panel_ApplyFadeAlpha(); draw_beginBoldFont(); @@ -964,6 +962,7 @@ void HUD_Ammo(void) mySize -= '2 2 0' * panel_bg_padding; } + const float AMMO_COUNT = 4; float rows = 0, columns, row, column; vector ammo_size; if (autocvar_hud_panel_ammo_onlycurrent) @@ -1155,7 +1154,6 @@ void HUD_Powerups(void) } HUD_Panel_UpdateCvars(); - HUD_Panel_ApplyFadeAlpha(); draw_beginBoldFont(); @@ -1277,10 +1275,7 @@ void HUD_Powerups(void) const float maxshield = 30; float shield = ceil(shield_time); if(autocvar_hud_panel_powerups_progressbar) - { - HUD_Panel_GetProgressBarColor(shield); - HUD_Panel_DrawProgressBar(pos + shield_offset, mySize, autocvar_hud_panel_powerups_progressbar_shield, shield/maxshield, is_vertical, shield_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); - } + HUD_Panel_DrawProgressBar(pos + shield_offset, mySize, autocvar_hud_panel_powerups_progressbar_shield, shield/maxshield, is_vertical, shield_baralign, autocvar_hud_progressbar_shield_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); if(autocvar_hud_panel_powerups_text) { if(shield > 1) @@ -1295,10 +1290,7 @@ void HUD_Powerups(void) const float maxstrength = 30; float strength = ceil(strength_time); if(autocvar_hud_panel_powerups_progressbar) - { - HUD_Panel_GetProgressBarColor(strength); - HUD_Panel_DrawProgressBar(pos + strength_offset, mySize, autocvar_hud_panel_powerups_progressbar_strength, strength/maxstrength, is_vertical, strength_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); - } + HUD_Panel_DrawProgressBar(pos + strength_offset, mySize, autocvar_hud_panel_powerups_progressbar_strength, strength/maxstrength, is_vertical, strength_baralign, autocvar_hud_progressbar_strength_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); if(autocvar_hud_panel_powerups_text) { if(strength > 1) @@ -1313,10 +1305,7 @@ void HUD_Powerups(void) const float maxsuperweapons = 30; float superweapons = ceil(superweapons_time); if(autocvar_hud_panel_powerups_progressbar) - { - HUD_Panel_GetProgressBarColor(superweapons); - HUD_Panel_DrawProgressBar(pos + superweapons_offset, mySize, autocvar_hud_panel_powerups_progressbar_superweapons, superweapons/maxsuperweapons, is_vertical, superweapons_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); - } + HUD_Panel_DrawProgressBar(pos + superweapons_offset, mySize, autocvar_hud_panel_powerups_progressbar_superweapons, superweapons/maxsuperweapons, is_vertical, superweapons_baralign, autocvar_hud_progressbar_superweapons_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); if(autocvar_hud_panel_powerups_text) { if(superweapons > 1) @@ -1396,7 +1385,6 @@ void HUD_HealthArmor(void) } HUD_Panel_UpdateCvars(); - HUD_Panel_ApplyFadeAlpha(); vector pos, mySize; pos = panel_pos; mySize = panel_size; @@ -1427,10 +1415,7 @@ void HUD_HealthArmor(void) { biggercount = "health"; if(autocvar_hud_panel_healtharmor_progressbar) - { - HUD_Panel_GetProgressBarColor(health); - HUD_Panel_DrawProgressBar(pos, mySize, autocvar_hud_panel_healtharmor_progressbar_health, x/maxtotal, 0, (baralign == 1 || baralign == 2), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); - } + HUD_Panel_DrawProgressBar(pos, mySize, autocvar_hud_panel_healtharmor_progressbar_health, x/maxtotal, 0, (baralign == 1 || baralign == 2), autocvar_hud_progressbar_health_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); if(armor) if(autocvar_hud_panel_healtharmor_text) drawpic_aspect_skin(pos + eX * mySize_x - eX * 0.5 * mySize_y, "armor", '0.5 0.5 0' * mySize_y, '1 1 1', panel_fg_alpha * armor / health, DRAWFLAG_NORMAL); @@ -1439,10 +1424,7 @@ void HUD_HealthArmor(void) { biggercount = "armor"; if(autocvar_hud_panel_healtharmor_progressbar) - { - HUD_Panel_GetProgressBarColor(armor); - HUD_Panel_DrawProgressBar(pos, mySize, autocvar_hud_panel_healtharmor_progressbar_armor, x/maxtotal, 0, (baralign == 1 || baralign == 2), progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); - } + HUD_Panel_DrawProgressBar(pos, mySize, autocvar_hud_panel_healtharmor_progressbar_armor, x/maxtotal, 0, (baralign == 1 || baralign == 2), autocvar_hud_progressbar_armor_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); if(health) if(autocvar_hud_panel_healtharmor_text) drawpic_aspect_skin(pos + eX * mySize_x - eX * 0.5 * mySize_y, "health", '0.5 0.5 0' * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); @@ -1451,10 +1433,7 @@ void HUD_HealthArmor(void) DrawNumIcon(pos, mySize, x, biggercount, 0, iconalign, HUD_Get_Num_Color(x, maxtotal), 1); if(fuel) - { - HUD_Panel_GetProgressBarColor(fuel); - HUD_Panel_DrawProgressBar(pos, eX * mySize_x + eY * 0.2 * mySize_y, "progressbar", fuel/100, 0, (baralign == 1 || baralign == 3), progressbar_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL); - } + HUD_Panel_DrawProgressBar(pos, eX * mySize_x + eY * 0.2 * mySize_y, "progressbar", fuel/100, 0, (baralign == 1 || baralign == 3), autocvar_hud_progressbar_fuel_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL); } else { @@ -1501,7 +1480,6 @@ void HUD_HealthArmor(void) { if(autocvar_hud_panel_healtharmor_progressbar) { - HUD_Panel_GetProgressBarColor(health); float p_health, pain_health_alpha; p_health = health; pain_health_alpha = 1; @@ -1534,7 +1512,7 @@ void HUD_HealthArmor(void) if (time - health_damagetime < 1) { float health_damagealpha = 1 - (time - health_damagetime)*(time - health_damagetime); - HUD_Panel_DrawProgressBar(pos + health_offset, mySize, autocvar_hud_panel_healtharmor_progressbar_health, health_beforedamage/maxhealth, is_vertical, health_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * health_damagealpha, DRAWFLAG_NORMAL); + HUD_Panel_DrawProgressBar(pos + health_offset, mySize, autocvar_hud_panel_healtharmor_progressbar_health, health_beforedamage/maxhealth, is_vertical, health_baralign, autocvar_hud_progressbar_health_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * health_damagealpha, DRAWFLAG_NORMAL); } } prev_health = health; @@ -1547,7 +1525,7 @@ void HUD_HealthArmor(void) pain_health_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); } } - HUD_Panel_DrawProgressBar(pos + health_offset, mySize, autocvar_hud_panel_healtharmor_progressbar_health, p_health/maxhealth, is_vertical, health_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * pain_health_alpha, DRAWFLAG_NORMAL); + HUD_Panel_DrawProgressBar(pos + health_offset, mySize, autocvar_hud_panel_healtharmor_progressbar_health, p_health/maxhealth, is_vertical, health_baralign, autocvar_hud_progressbar_health_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * pain_health_alpha, DRAWFLAG_NORMAL); } if(autocvar_hud_panel_healtharmor_text) DrawNumIcon(pos + health_offset, mySize, health, "health", is_vertical, health_iconalign, HUD_Get_Num_Color(health, maxhealth), 1); @@ -1557,7 +1535,6 @@ void HUD_HealthArmor(void) { if(autocvar_hud_panel_healtharmor_progressbar) { - HUD_Panel_GetProgressBarColor(armor); float p_armor; p_armor = armor; if (autocvar_hud_panel_healtharmor_progressbar_gfx) @@ -1589,12 +1566,12 @@ void HUD_HealthArmor(void) if (time - armor_damagetime < 1) { float armor_damagealpha = 1 - (time - armor_damagetime)*(time - armor_damagetime); - HUD_Panel_DrawProgressBar(pos + armor_offset, mySize, autocvar_hud_panel_healtharmor_progressbar_armor, armor_beforedamage/maxarmor, is_vertical, armor_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * armor_damagealpha, DRAWFLAG_NORMAL); + HUD_Panel_DrawProgressBar(pos + armor_offset, mySize, autocvar_hud_panel_healtharmor_progressbar_armor, armor_beforedamage/maxarmor, is_vertical, armor_baralign, autocvar_hud_progressbar_armor_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * armor_damagealpha, DRAWFLAG_NORMAL); } } prev_armor = armor; } - HUD_Panel_DrawProgressBar(pos + armor_offset, mySize, autocvar_hud_panel_healtharmor_progressbar_armor, p_armor/maxarmor, is_vertical, armor_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + HUD_Panel_DrawProgressBar(pos + armor_offset, mySize, autocvar_hud_panel_healtharmor_progressbar_armor, p_armor/maxarmor, is_vertical, armor_baralign, autocvar_hud_progressbar_armor_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); } if(autocvar_hud_panel_healtharmor_text) DrawNumIcon(pos + armor_offset, mySize, armor, "armor", is_vertical, armor_iconalign, HUD_Get_Num_Color(armor, maxarmor), 1); @@ -1610,8 +1587,7 @@ void HUD_HealthArmor(void) mySize_x *= 2; //restore full panel size else if (panel_ar < 1/4) mySize_y *= 2; //restore full panel size - HUD_Panel_GetProgressBarColor(fuel); - HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", fuel/100, is_vertical, fuel_baralign, progressbar_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL); + HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", fuel/100, is_vertical, fuel_baralign, autocvar_hud_progressbar_fuel_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL); } } } @@ -1649,7 +1625,6 @@ void HUD_Notify(void) } HUD_Panel_UpdateCvars(); - HUD_Panel_ApplyFadeAlpha(); vector pos, mySize; pos = panel_pos; mySize = panel_size; @@ -1786,7 +1761,6 @@ void HUD_Timer(void) } HUD_Panel_UpdateCvars(); - HUD_Panel_ApplyFadeAlpha(); draw_beginBoldFont(); @@ -1854,7 +1828,6 @@ void HUD_Radar(void) } HUD_Panel_UpdateCvars(); - HUD_Panel_ApplyFadeAlpha(); float f = 0; @@ -1866,8 +1839,13 @@ void HUD_Radar(void) panel_pos_x = (vid_conwidth - panel_size_x) / 2; panel_pos_y = (vid_conheight - panel_size_y) / 2; + string panel_bg; panel_bg = strcat(hud_skin_path, "/border_default"); // always use the default border when maximized - if(precache_pic(panel_bg) == "") { panel_bg = "gfx/hud/default/border_default"; } // fallback + if(precache_pic(panel_bg) == "") + panel_bg = "gfx/hud/default/border_default"; // fallback + if(panel.current_panel_bg) + strunzone(panel.current_panel_bg); + panel.current_panel_bg = strzone(panel_bg); switch(hud_panel_radar_maximized_zoommode) { @@ -2016,7 +1994,7 @@ void HUD_Radar(void) // Score (#7) // void HUD_UpdatePlayerTeams(); -void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count) +void HUD_Score_Rankings(vector pos, vector mySize, entity me) { float score; entity tm = world, pl; @@ -2146,7 +2124,6 @@ void HUD_Score(void) } HUD_Panel_UpdateCvars(); - HUD_Panel_ApplyFadeAlpha(); vector pos, mySize; pos = panel_pos; mySize = panel_size; @@ -2207,7 +2184,7 @@ void HUD_Score(void) } else if (!teamplay) { // non-teamgames if ((spectatee_status == -1 && !autocvar__hud_configure) || autocvar_hud_panel_score_rankings) { - HUD_Score_Rankings(pos, mySize, me, 0); + HUD_Score_Rankings(pos, mySize, me); return; } // me vector := [team/connected frags id] @@ -2248,23 +2225,21 @@ void HUD_Score(void) drawstring_aspect(pos + eX * 0.75 * mySize_x, distribution_str, eX * 0.25 * mySize_x + eY * (1/3) * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL); draw_endBoldFont(); } else { // teamgames - float scores_count = 0, row, column, rows = 0, columns = 0; + float row, column, rows = 0, columns = 0; local noref vector offset = '0 0 0'; vector score_pos, score_size; //for scores other than myteam - if (spectatee_status == -1 || autocvar_hud_panel_score_rankings) + if(autocvar_hud_panel_score_rankings) + { + HUD_Score_Rankings(pos, mySize, me); + return; + } + if(spectatee_status == -1) { - for(tm = teams.sort_next; tm, tm.team != NUM_SPECTATOR; tm = tm.sort_next) - ++scores_count; - if (autocvar_hud_panel_score_rankings) - { - HUD_Score_Rankings(pos, mySize, me, scores_count); - return; - } rows = mySize_y/mySize_x; - rows = bound(1, floor((sqrt(4 * (3/1) * rows * scores_count + rows * rows) + rows + 0.5) / 2), scores_count); + rows = bound(1, floor((sqrt(4 * (3/1) * rows * team_count + rows * rows) + rows + 0.5) / 2), team_count); // ^^^ ammo item aspect goes here - columns = ceil(scores_count/rows); + columns = ceil(team_count/rows); score_size = eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows); @@ -2341,7 +2316,6 @@ void HUD_RaceTimer (void) } HUD_Panel_UpdateCvars(); - HUD_Panel_ApplyFadeAlpha(); draw_beginBoldFont(); @@ -2542,7 +2516,6 @@ void HUD_Vote(void) return; HUD_Panel_UpdateCvars(); - HUD_Panel_ApplyFadeAlpha(); if(uid2name_dialog) { @@ -2693,11 +2666,6 @@ void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, float layout, f void HUD_Mod_CA(vector myPos, vector mySize) { mod_active = 1; // required in each mod function that always shows something - entity tm; - float teams_count = 0; - for(tm = teams.sort_next; tm; tm = tm.sort_next) - if(tm.team != NUM_SPECTATOR) - ++teams_count; float layout; if(gametype == MAPINFO_TYPE_CA) @@ -2707,14 +2675,14 @@ void HUD_Mod_CA(vector myPos, vector mySize) float rows, columns, aspect_ratio; rows = mySize_y/mySize_x; aspect_ratio = (layout) ? 2 : 1; - rows = bound(1, floor((sqrt((4 * aspect_ratio * teams_count + rows) * rows) + rows + 0.5) / 2), teams_count); - columns = ceil(teams_count/rows); + rows = bound(1, floor((sqrt((4 * aspect_ratio * team_count + rows) * rows) + rows + 0.5) / 2), team_count); + columns = ceil(team_count/rows); int i; float row = 0, column = 0; vector pos, itemSize; itemSize = eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows); - for(i=0; i 1) p = 2 - p; - //Draw the filling - HUD_Panel_GetProgressBarColor(nexball); - if(mySize_x > mySize_y) - HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", p, 0, 0, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); - else - HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", p, 1, 0, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", p, (mySize_x <= mySize_y), 0, autocvar_hud_progressbar_nexball_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); } if (stat_items & IT_KEY1) @@ -3324,24 +3287,19 @@ void DrawDomItem(vector myPos, vector mySize, float aspect_ratio, float layout, void HUD_Mod_Dom(vector myPos, vector mySize) { mod_active = 1; // required in each mod function that always shows something - entity tm; - float teams_count = 0; - for(tm = teams.sort_next; tm; tm = tm.sort_next) - if(tm.team != NUM_SPECTATOR) - ++teams_count; float layout = autocvar_hud_panel_modicons_dom_layout; float rows, columns, aspect_ratio; rows = mySize_y/mySize_x; aspect_ratio = (layout) ? 3 : 1; - rows = bound(1, floor((sqrt((4 * aspect_ratio * teams_count + rows) * rows) + rows + 0.5) / 2), teams_count); - columns = ceil(teams_count/rows); + rows = bound(1, floor((sqrt((4 * aspect_ratio * team_count + rows) * rows) + rows + 0.5) / 2), team_count); + columns = ceil(team_count/rows); int i; float row = 0, column = 0; vector pos, itemSize; itemSize = eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows); - for(i=0; i= 0.96 * vid_conheight) return; @@ -4420,21 +4374,13 @@ void HUD_Main (void) if(scoreboard_fade_alpha) hud_fade_alpha = (1 - scoreboard_fade_alpha); - if(autocvar__hud_configure) - if(isdemo()) - HUD_Configure_Exit_Force(); + HUD_Configure_Frame(); if(intermission == 2) // no hud during mapvote - { - if (autocvar__hud_configure) - HUD_Configure_Exit_Force(); hud_fade_alpha = 0; - } - else if(autocvar__menu_alpha == 0 && scoreboard_fade_alpha == 0) - hud_fade_alpha = 1; // panels that we want to be active together with the scoreboard - // they must call HUD_Panel_ApplyFadeAlpha(); only when showing the menu + // they must fade only when the menu does if(scoreboard_fade_alpha == 1) { (panel = HUD_PANEL(CENTERPRINT)).panel_draw(); @@ -4455,24 +4401,6 @@ void HUD_Main (void) hud_skin_prev = strzone(autocvar_hud_skin); } - // HUD configure visible grid - if(autocvar__hud_configure && autocvar_hud_configure_grid && autocvar_hud_configure_grid_alpha) - { - hud_configure_gridSize_x = bound(0.005, cvar("hud_configure_grid_xsize"), 0.2); - hud_configure_gridSize_y = bound(0.005, cvar("hud_configure_grid_ysize"), 0.2); - hud_configure_realGridSize_x = hud_configure_gridSize_x * vid_conwidth; - hud_configure_realGridSize_y = hud_configure_gridSize_y * vid_conheight; - vector s; - // x-axis - s = eX + eY * vid_conheight; - for(i = 1; i < 1/hud_configure_gridSize_x; ++i) - drawfill(eX * i * hud_configure_realGridSize_x, s, '0.5 0.5 0.5', autocvar_hud_configure_grid_alpha, DRAWFLAG_NORMAL); - // y-axis - s = eY + eX * vid_conwidth; - for(i = 1; i < 1/hud_configure_gridSize_y; ++i) - drawfill(eY * i * hud_configure_realGridSize_y, s, '0.5 0.5 0.5', autocvar_hud_configure_grid_alpha, DRAWFLAG_NORMAL); - } - #ifdef COMPAT_XON050_ENGINE current_player = (spectatee_status > 0) ? spectatee_status : player_localentnum; #else @@ -4573,34 +4501,7 @@ void HUD_Main (void) if(autocvar__con_chat_maximized) (panel = HUD_PANEL(CHAT)).panel_draw(); - if(autocvar__hud_configure) - { - if(tab_panel) - { - panel = tab_panel; - HUD_Panel_UpdatePosSize() - drawfill(panel_pos - '1 1 0' * panel_bg_border, panel_size + '2 2 0' * panel_bg_border, '1 1 1', .2, DRAWFLAG_NORMAL); - } - if(highlightedPanel) - { - panel = highlightedPanel; - HUD_Panel_UpdatePosSize() - HUD_Panel_HlBorder(panel_bg_border + 1.5 * hlBorderSize, '0 0.5 1', 0.25 * (1 - autocvar__menu_alpha)); - } - if(!hud_configure_prev || hud_configure_prev == -1) - { - if(autocvar_hud_cursormode) { setcursormode(1); } - hudShiftState = 0; - for(i = HUD_PANEL_NUM - 1; i >= 0; --i) - hud_panel[panel_order[i]].update_time = time; - } - } - else if(hud_configure_prev && hud_configure_prev != -1 && autocvar_hud_cursormode) - setcursormode(0); + HUD_Configure_PostDraw(); hud_configure_prev = autocvar__hud_configure; - - if (!autocvar__hud_configure) // hud config mode disabled, enable normal theAlpha stuff again - if (menu_enabled) - menu_enabled = 0; }