]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/hud_code_cleanup
authorterencehill <piuntn@gmail.com>
Sun, 16 Jun 2013 15:00:06 +0000 (17:00 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 16 Jun 2013 15:00:06 +0000 (17:00 +0200)
Conflicts:
qcsrc/client/hud.qc
qcsrc/client/hud.qh

1  2 
qcsrc/client/Main.qc
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/scoreboard.qc

Simple merge
Simple merge
index 3d079bc8ad5caa700189b1834c538605dac192d0,273f427e49d11b182662b0a9566c80734e1051f7..365496e7767d860ede359ca63441752bc2422a9f
@@@ -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)
index 1c6908a7b04b1663e18f0491077b089066093882,db9405ef6af6039b968176b9de277fb0aae5820b..12b3919b8e4fb6c254cb8a63fc59d87feb97c9a5
@@@ -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; \
Simple merge