From: terencehill Date: Sun, 16 Jun 2013 15:00:06 +0000 (+0200) Subject: Merge branch 'master' into terencehill/hud_code_cleanup X-Git-Tag: xonotic-v0.8.0~226^2~1^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=52b68cb65b8c40a9363e67eaef7f1eca80bd56cf;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into terencehill/hud_code_cleanup Conflicts: qcsrc/client/hud.qc qcsrc/client/hud.qh --- 52b68cb65b8c40a9363e67eaef7f1eca80bd56cf diff --cc qcsrc/client/hud.qc index 3d079bc8a,273f427e4..365496e77 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@@ -264,8 -264,8 +264,8 @@@ HUD panel // draw the background/borders #define HUD_Panel_DrawBg(theAlpha)\ - if(panel.current_panel_bg != "0")\ -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) diff --cc qcsrc/client/hud.qh index 1c6908a7b,db9405ef6..12b3919b8 --- a/qcsrc/client/hud.qh +++ b/qcsrc/client/hud.qh @@@ -288,25 -333,22 +288,26 @@@ if(panel.update_time <= time) { panel_bg_alpha_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_alpha")); \ panel_bg_border_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_border")); \ panel_bg_padding_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_padding")); \ - HUD_Panel_GetStringVars()\ + HUD_Panel_GetBg()\ + if (panel.current_panel_bg != "0") {\ + HUD_Panel_GetColorTeam()\ + HUD_Panel_GetColor()\ + HUD_Panel_GetBgAlpha()\ + HUD_Panel_GetBorder()\ + }\ + HUD_Panel_GetFgAlpha()\ + HUD_Panel_GetPadding()\ + panel.current_panel_bg_alpha = panel_bg_alpha; \ + panel.current_panel_fg_alpha = panel_fg_alpha; \ if(menu_enabled == 2 && panel == highlightedPanel) {\ - HUD_Panel_GetMenuSize()\ - HUD_Panel_GetMenuPos()\ - } \ + HUD_Panel_UpdatePosSize_ForMenu()\ + } else {\ + panel_bg_alpha *= hud_fade_alpha;\ + panel_fg_alpha *= hud_fade_alpha;\ + }\ panel.current_panel_pos = panel_pos; \ panel.current_panel_size = panel_size; \ - if(panel.current_panel_bg) \ - strunzone(panel.current_panel_bg); \ - if(panel_bg == "")\ - {\ - /*print(sprintf("^xf08 %s panel: panel_bg is empty\n", panel.panel_name));*/\ - panel_bg = "0";\ - }\ - panel.current_panel_bg = strzone(panel_bg); \ + panel.current_panel_bg_alpha = panel_bg_alpha; \ panel.current_panel_bg_border = panel_bg_border; \ panel.current_panel_bg_color = panel_bg_color; \ panel.current_panel_bg_color_team = panel_bg_color_team; \