// draw the background/borders
#define HUD_Panel_DrawBg(theAlpha)\
-if(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))
//basically the same code of draw_ButtonPicture and draw_VertButtonPicture for the menu
} \
panel.current_panel_pos = panel_pos; \
panel.current_panel_size = panel_size; \
- if(panel.current_panel_bg != "") \
+ 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_pos = panel.current_panel_pos; \
panel_size = panel.current_panel_size; \
panel_bg = panel.current_panel_bg; \
+ if(panel.current_panel_bg == "")\
+ {\
+ print(sprintf("^xf08 %s panel: panel.current_panel_bg is empty\n", panel.panel_name));\
+ panel_bg = "0";\
+ }\
panel_bg_alpha = panel.current_panel_bg_alpha; \
panel_bg_border = panel.current_panel_bg_border; \
panel_bg_color = panel.current_panel_bg_color; \