]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qc
force showing a background in config mode, also adapt old nexuiz hud config for the...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qc
index e4f98d387c39b14d12e9f9eb5c751cb438f164d1..80421f67b177ddfdeb2fd74dc8a7a1a27f2be20e 100644 (file)
@@ -746,6 +746,8 @@ float HUD_Panel_GetPadding(float id)
 // draw the background/borders
 void HUD_Panel_DrawBg(float id, vector pos, vector mySize)
 {
+       float alpha;
+
        if(!hud_configure && cvar_string(strcat("hud_", HUD_Panel_GetName(id), "_bg")) == "0")
                return;
 
@@ -754,6 +756,11 @@ void HUD_Panel_DrawBg(float id, vector pos, vector mySize)
        if(bg == "")
                bg = cvar_string("hud_bg");
 
+       if(bg == "0" && hud_configure) {
+               bg = "border"; // we probably want to see a background in config mode at all times...
+               alpha = cvar("hud_configure_bg_minalpha");
+       }
+
        if(bg != "0")
        {
                float border;
@@ -762,8 +769,8 @@ void HUD_Panel_DrawBg(float id, vector pos, vector mySize)
                vector color;
                color = HUD_Panel_GetColor(id);
 
-               float alpha;
-               alpha = HUD_Panel_GetAlpha(id);
+               if(!alpha)
+                       alpha = HUD_Panel_GetAlpha(id);
 
                draw_BorderPicture(pos - '1 1 0' * border, strcat("gfx/hud/", cvar_string("hud_skin"), "/", bg), mySize + '1 1 0' * 2 * border, color, alpha, '1 1 0' * (border/BORDER_MULTIPLIER));
        }