// Little help for the poor people who have to make sense of this: Start from the bottom ;)
#define HUD_Panel_GetProgressBarColor(item) \
+ progressbar_color = autocvar_hud_progressbar_##item##_color
+#define HUD_Panel_GetProgressBarColorForString(item) \
switch(item) {\
- case "strength": progressbar_color = autocvar_hud_progressbar_strength_color; break;\
- case "shield": progressbar_color = autocvar_hud_progressbar_shield_color; break;\
- case "health": progressbar_color = autocvar_hud_progressbar_health_color; break;\
- case "armor": progressbar_color = autocvar_hud_progressbar_armor_color; break;\
- case "fuel": progressbar_color = autocvar_hud_progressbar_fuel_color; break;\
- case "nexball": progressbar_color = autocvar_hud_progressbar_nexball_color; break;\
+ case "strength": HUD_Panel_GetProgressBarColor(strength); break;\
+ case "shield": HUD_Panel_GetProgressBarColor(shield); break;\
+ case "health": HUD_Panel_GetProgressBarColor(health); break;\
+ case "armor": HUD_Panel_GetProgressBarColor(armor); break;\
+ case "fuel": HUD_Panel_GetProgressBarColor(fuel); break;\
+ case "nexball": HUD_Panel_GetProgressBarColor(nexball); break;\
}
// Get value for panel_bg: if "" fetch default, else use panel_bg_str