]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
smaller, less annoying complain bubble (also easy way to ensure it doesnt go off...
authorFruitieX <rasse@rasse-lappy.localdomain>
Tue, 6 Jul 2010 11:57:19 +0000 (14:57 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Tue, 6 Jul 2010 11:57:19 +0000 (14:57 +0300)
hud_wickedhud_default.cfg
qcsrc/client/autocvars.qh
qcsrc/client/hud.qc

index c44fee689328829eba2de836aa02240e7438f464..4f0af352bbcc4550c1658cc790b428c9c12ff949 100644 (file)
@@ -28,8 +28,8 @@ seta hud_weaponicons_size "0.040000 0.490000" "size of this panel"
 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"
 seta hud_weaponicons_complainbubble_time 1 "time that a new entry stays until it fades out"
+seta hud_weaponicons_complainbubble_padding -10 "padding for the complainbubble"
 seta hud_weaponicons_complainbubble_fadetime 0.25 "fade out time"
 seta hud_weaponicons_bg "border_weaponicons" "if set to something else than \"\" = override default background"
 seta hud_weaponicons_bg_color "" "if set to something else than \"\" = override default panel background color"
index 2b63a77cc8a741e3473ec44e248ddb92392acdbf..a686ac5dcda740cff7787a4c806ad35aa7bf763a 100644 (file)
@@ -52,7 +52,7 @@ 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_padding;
 var float autocvar_hud_weaponicons_complainbubble_time;
 var float autocvar_hud_weaponicons_complainbubble_fadetime;
 
index b6e1f10eb8baab4978d5c3a39f64fc7dcfb2d72b..984d13e5df8f275ad834f140dbf0dd4247ad176c 100644 (file)
@@ -1585,24 +1585,21 @@ void HUD_WeaponIcons(void)
                                        a = 0;
                        }
 
-                       vector complain_bubble_size = '100 50 0' * bound(0.25, autocvar_hud_weaponicons_complainbubble_size, 2);
-                       drawpic_aspect_skin(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows) - complain_bubble_size + 0.5 * (eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows)), "weapon_complainbubble", complain_bubble_size, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
-
                        string s;
                        if(complain_weapon_type == 0) {
-                               s = "Out of ammo for the";
+                               s = "Out of ammo";
                                color = '1 0 0';
                        }
                        else if(complain_weapon_type == 1) {
-                               s = "You don't have the";
+                               s = "Don't have";
                                color = '1 1 0';
                        }
                        else {
-                               s = "Map doesn't have the";
+                               s = "Unavailable";
                                color = '1 1 1';
                        }
-                       drawstring_aspect(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows) - complain_bubble_size + eX * 0.05 * complain_bubble_size_x + eY * (1/6) * complain_bubble_size_y + 0.5 * (eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows)), s, eX * 0.9 * complain_bubble_size_x + eY * 0.2 * complain_bubble_size_y, 0.2 * complain_bubble_size_y, color, panel_fg_alpha * a, DRAWFLAG_NORMAL);
-                       drawstring_aspect(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows) - complain_bubble_size + eX * 0.05 * complain_bubble_size_x + eY * (11/30) * complain_bubble_size_y + 0.5 * (eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows)), complain_weapon_name, eX * 0.9 * complain_bubble_size_x + eY * 0.25 * complain_bubble_size_y, 0.25 * complain_bubble_size_y, '1 0 0', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                       drawpic_aspect_skin(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows) + '1 1 0' * autocvar_hud_weaponicons_complainbubble_padding, "weapon_complainbubble", eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows) - '2 2 0' * autocvar_hud_weaponicons_complainbubble_padding, color, a * panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows) + '1 1 0' * autocvar_hud_weaponicons_complainbubble_padding, s, eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows) - '2 2 0' * autocvar_hud_weaponicons_complainbubble_padding, mySize_y*(1/rows), '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
 
                ++row;