]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qc
attempt to make a little nicer looking complain bubble
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qc
index 132643ad599c67eb7986bb541e954372e5d2a355..0f962ca36a76a1673ce597a95f8b8a309268c24c 100644 (file)
@@ -1582,18 +1582,18 @@ void HUD_WeaponIcons(void)
                        string s;
                        if(complain_weapon_type == 0) {
                                s = "Out of ammo";
-                               color = '1 0 0';
+                               color = '0.8 0 0';
                        }
                        else if(complain_weapon_type == 1) {
                                s = "Don't have";
-                               color = '1 1 0';
+                               color = '0.8 0.5 0';
                        }
                        else {
                                s = "Unavailable";
-                               color = '1 1 1';
+                               color = '0 0.3 0.8';
                        }
-                       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, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                       drawpic_aspect_skin(wpnpos + '1 1 0' * autocvar_hud_weaponicons_complainbubble_padding, "weapon_complainbubble", wpnsize - '2 2 0' * autocvar_hud_weaponicons_complainbubble_padding, color, a * panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(wpnpos + '1 1 0' * autocvar_hud_weaponicons_complainbubble_padding, s, wpnsize - '2 2 0' * autocvar_hud_weaponicons_complainbubble_padding, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
 
                ++row;
@@ -2182,10 +2182,10 @@ void HUD_HealthArmor(void)
                        {
                                if(autocvar_hud_healtharmor_baralign == 1 || autocvar_hud_healtharmor_baralign == 3) { // right align
                                        barpos = pos + eX * mySize_x - eX * mySize_x * min(1, leftcnt/200);
-                                       barsize = eX * mySize_x * min(1, rightcnt/200) + eY * 0.5 * mySize_y;
+                                       barsize = eX * mySize_x * min(1, leftcnt/200) + eY * 0.5 * mySize_y;
                                } else { // left align
                                        barpos = pos;
-                                       barsize = eX * mySize_x * min(1, rightcnt/200) + eY * 0.5 * mySize_y;
+                                       barsize = eX * mySize_x * min(1, leftcnt/200) + eY * 0.5 * mySize_y;
                                }
 
                                HUD_Panel_GetProgressBarColor(leftname)