]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
(new cvar) show bind on weapon instead of number
authorFruitieX <rasse@rasse-lappy.localdomain>
Fri, 2 Jul 2010 17:26:00 +0000 (20:26 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Fri, 2 Jul 2010 17:26:00 +0000 (20:26 +0300)
hud_wickedhud_default.cfg
qcsrc/client/autocvars.qh
qcsrc/client/hud.qc

index f755101411bc21882cd7c947ee402da6335815f5..2eb38baa72654d8ed39864ad691d0a373c23533c 100644 (file)
@@ -23,7 +23,7 @@ seta hud_progressbar_nexball_color "0.7 0.1 0" "R G B vector of the progress bar
 seta hud_weaponicons 1 "enable/disable this panel"
 seta hud_weaponicons_pos "0.930000 0.090000" "position of this panel"
 seta hud_weaponicons_size "0.040000 0.490000" "size of this panel"
-seta hud_weaponicons_number 1 "show number of weapon"
+seta hud_weaponicons_number 1 "1 = show number of weapon, 2 = show bound key of weapon"
 seta hud_weaponicons_accuracy_yellow 40 "percentage at which the accuracy color is yellow"
 seta hud_weaponicons_complainbubble 1 "complain bubble (out of ammo, weapon not available etc)"
 seta hud_weaponicons_complainbubble_size 1 "size multiplier of the complain bubble"
index 11aad21fb7d6151a4c7757b84fc74502b76e29e0..8d1446772da1df84873f43c1991cd9f0c54a8162 100644 (file)
@@ -48,6 +48,7 @@ var string autocvar_hud_weaponicons_bg_alpha;
 var string autocvar_hud_weaponicons_bg_border;
 var string autocvar_hud_weaponicons_bg_padding;
 var float autocvar_hud_weaponicons_accuracy_yellow;
+var float autocvar_hud_weaponicons_number;
 var float autocvar_hud_weaponicons_complainbubble;
 var float autocvar_hud_weaponicons_complainbubble_size;
 var float autocvar_hud_weaponicons_complainbubble_time;
index 4ec5852d4d008313f3601806999babd06c849ded..bc3ef552e47123b6d4a161159a3540a4c66c0609 100644 (file)
@@ -1452,9 +1452,12 @@ void HUD_WeaponIcons(void)
                {
                        drawpic_aspect_skin(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows), strcat("weapon", self.netname), eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows), '1 1 1', fade * panel_fg_alpha, DRAWFLAG_NORMAL);
 
-                       if(cvar_or("hud_weaponicons_number", 1))
+                       if(autocvar_hud_weaponicons_number == 1) // weapon number
                                drawstring(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows), ftos(weapid), '1 1 0' * 0.5 * mySize_y*(1/rows), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                       else if(autocvar_hud_weaponicons_number == 2) // bind
+                               drawstring(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows), getcommandkey(ftos(weapid), strcat("impulse ", ftos(weapid))), '1 1 0' * 0.5 * mySize_y*(1/rows), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                }
+
                // draw a "ghost weapon icon" if you don't have the weapon
                else
                {