]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qh
fix all remaining warnings
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qh
index 5e2a28200caf836982a3073cbe57761f9d153d46..ca0df8e24881251cfad02c77217cdd99c60d93e6 100644 (file)
@@ -96,13 +96,15 @@ var float panel_accuracy_alreadyvoted_alpha;
 // 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