]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
hud_panel_itemstime_progressbar_reduced to avoid drawing the progressbar under the...
authorterencehill <piuntn@gmail.com>
Tue, 20 Dec 2011 00:05:07 +0000 (01:05 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 20 Dec 2011 00:05:07 +0000 (01:05 +0100)
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
qcsrc/client/autocvars.qh
qcsrc/client/hud.qc

index 628b5334c766da24701baeea43f9f295d6b52c10..723d77efa792bbf12a08cee48fd5609bf8150e16 100644 (file)
@@ -294,7 +294,7 @@ seta hud_panel_itemstime_bg_padding ""
 seta hud_panel_itemstime_iconalign "0"
 seta hud_panel_itemstime_progressbar "0"
 seta hud_panel_itemstime_progressbar_name "progressbar"
-seta hud_panel_itemstime_progressbar_xoffset "0"
+seta hud_panel_itemstime_progressbar_reduced "0"
 seta hud_panel_itemstime_showspawned "0"
 seta hud_panel_itemstime_text "1"
 
index a40f86d39ce3e51108969712f19dd10259e3f5cd..802231d7bdb5ad2a59cfa3405cdee1ee1be155c4 100644 (file)
@@ -294,7 +294,7 @@ seta hud_panel_itemstime_bg_padding ""
 seta hud_panel_itemstime_iconalign "0"
 seta hud_panel_itemstime_progressbar "0"
 seta hud_panel_itemstime_progressbar_name "progressbar"
-seta hud_panel_itemstime_progressbar_xoffset "0"
+seta hud_panel_itemstime_progressbar_reduced "0"
 seta hud_panel_itemstime_showspawned "0"
 seta hud_panel_itemstime_text "1"
 
index 5e93e80f420dc9a0e3329f93bcbc3b95bc5a3c8d..df62eb38d44ba0b69288c9915598068c88d6a555 100644 (file)
@@ -294,7 +294,7 @@ seta hud_panel_itemstime_bg_padding ""
 seta hud_panel_itemstime_iconalign "0"
 seta hud_panel_itemstime_progressbar "0"
 seta hud_panel_itemstime_progressbar_name "progressbar"
-seta hud_panel_itemstime_progressbar_xoffset "0"
+seta hud_panel_itemstime_progressbar_reduced "0"
 seta hud_panel_itemstime_showspawned "0"
 seta hud_panel_itemstime_text "1"
 
index 2241e187d8c5828716e13c55e0b34ce4f476c728..07e0147a60674d2ff134c3a66d9bab87646afe2f 100644 (file)
@@ -294,7 +294,7 @@ seta hud_panel_itemstime_bg_padding ""
 seta hud_panel_itemstime_iconalign "0"
 seta hud_panel_itemstime_progressbar "0"
 seta hud_panel_itemstime_progressbar_name "progressbar"
-seta hud_panel_itemstime_progressbar_xoffset "0"
+seta hud_panel_itemstime_progressbar_reduced "0"
 seta hud_panel_itemstime_showspawned "0"
 seta hud_panel_itemstime_text "1"
 
index 1a5f9eabe72ff759035605b7df2e01cc11427a07..5fbfb9d4edb5d29d5e7a2a16ecc126d39d530013 100644 (file)
@@ -294,7 +294,7 @@ seta hud_panel_itemstime_bg_padding ""
 seta hud_panel_itemstime_iconalign "0"
 seta hud_panel_itemstime_progressbar "0"
 seta hud_panel_itemstime_progressbar_name "progressbar"
-seta hud_panel_itemstime_progressbar_xoffset "0"
+seta hud_panel_itemstime_progressbar_reduced "0"
 seta hud_panel_itemstime_showspawned "0"
 seta hud_panel_itemstime_text "1"
 
index 342aafdd3f3ecb93e5cc8fe2dbc704b029337ace..e9b088a9d1eb07e398b7d0dcd6a5c231dbbfbb82 100644 (file)
@@ -247,7 +247,7 @@ float autocvar_hud_panel_itemstime_iconalign;
 float autocvar_hud_panel_itemstime_progressbar;
 float autocvar_hud_panel_itemstime_progressbar_maxtime;
 string autocvar_hud_panel_itemstime_progressbar_name;
-float autocvar_hud_panel_itemstime_progressbar_xoffset;
+float autocvar_hud_panel_itemstime_progressbar_reduced;
 float autocvar_hud_panel_itemstime_showspawned;
 float autocvar_hud_panel_itemstime_text;
 float autocvar_hud_panel_modicons;
index c7fb2fc2334c2c9a72fe4e1b4732ca6dc3a570dd..76daff588d97eebb88fc54ecd16c8724304e902d 100644 (file)
@@ -4836,11 +4836,24 @@ void DrawItemsTimeItem(vector myPos, vector mySize, float itemcode)
                picpos = myPos;
        }
 
-    if(t > 0 && autocvar_hud_panel_itemstime_progressbar)
-        HUD_Panel_DrawProgressBar(myPos + eX * autocvar_hud_panel_itemstime_progressbar_xoffset * mySize_x, mySize - eX * autocvar_hud_panel_itemstime_progressbar_xoffset * mySize_x, autocvar_hud_panel_itemstime_progressbar_name, t/autocvar_hud_panel_itemstime_progressbar_maxtime, 0, 0, color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+       if(t > 0 && autocvar_hud_panel_itemstime_progressbar)
+       {
+               vector p_pos, p_size;
+               if(autocvar_hud_panel_itemstime_progressbar_reduced)
+               {
+                       p_pos = numpos;
+                       p_size = eX * (2/3) * mySize_x + eY * mySize_y;
+               }
+               else
+               {
+                       p_pos = myPos;
+                       p_size = mySize;
+               }
+               HUD_Panel_DrawProgressBar(p_pos, p_size, autocvar_hud_panel_itemstime_progressbar_name, t/autocvar_hud_panel_itemstime_progressbar_maxtime, 0, 0, color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+       }
 
-    if(t > 0 && autocvar_hud_panel_itemstime_text)
-       drawstring_aspect(numpos, ftos(t), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+       if(t > 0 && autocvar_hud_panel_itemstime_text)
+               drawstring_aspect(numpos, ftos(t), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
        drawpic_aspect_skin(picpos, GetItemsTimePicture(itemcode), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * picalpha, DRAWFLAG_NORMAL);
 }