]> 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 cb55a4e1c38b68e48624780f8ad544e5dcd3ea04..0f962ca36a76a1673ce597a95f8b8a309268c24c 100644 (file)
@@ -1236,7 +1236,7 @@ void HUD_Panel_Mouse()
        if(highlightedPanel != -1)
                highlightedPanel_prev = highlightedPanel;
 
        if(highlightedPanel != -1)
                highlightedPanel_prev = highlightedPanel;
 
-       mousepos = mousepos + getmousepos();
+       mousepos = mousepos + getmousepos() * cvar("menu_mouse_speed");
 
        mousepos_x = bound(0, mousepos_x, vid_conwidth);
        mousepos_y = bound(0, mousepos_y, vid_conheight);
 
        mousepos_x = bound(0, mousepos_x, vid_conwidth);
        mousepos_y = bound(0, mousepos_y, vid_conheight);
@@ -1582,18 +1582,18 @@ void HUD_WeaponIcons(void)
                        string s;
                        if(complain_weapon_type == 0) {
                                s = "Out of ammo";
                        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";
                        }
                        else if(complain_weapon_type == 1) {
                                s = "Don't have";
-                               color = '1 1 0';
+                               color = '0.8 0.5 0';
                        }
                        else {
                                s = "Unavailable";
                        }
                        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;
                }
 
                ++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);
                        {
                                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;
                                } 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)
                                }
 
                                HUD_Panel_GetProgressBarColor(leftname)
@@ -2871,7 +2871,6 @@ void HUD_Notify (void)
                        {
                                s = "notify_death";
                        }
                        {
                                s = "notify_death";
                        }
-                       // TODO: ctf icons...
                        else if(killnotify_deathtype[j] == INFO_GOTFLAG)
                        {
                                if(killnotify_victims[j] == "^1RED^7 flag")
                        else if(killnotify_deathtype[j] == INFO_GOTFLAG)
                        {
                                if(killnotify_victims[j] == "^1RED^7 flag")
@@ -4662,10 +4661,13 @@ void HUD_Main (void)
 
        float f;
        vector color;
 
        float f;
        vector color;
-       if(teamplay && autocvar_hud_dock_color_team) {
+       if((teamplay) && autocvar_hud_dock_color_team) {
                f = stof(getplayerkey(player_localentnum - 1, "colors"));
                color = colormapPaletteColor(mod(f, 16), 1) * autocvar_hud_dock_color_team;
        }
                f = stof(getplayerkey(player_localentnum - 1, "colors"));
                color = colormapPaletteColor(mod(f, 16), 1) * autocvar_hud_dock_color_team;
        }
+       else if(autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && autocvar_hud_dock_color_team) {
+               color = '1 0 0' * autocvar_hud_dock_color_team;
+       }
        else if(autocvar_hud_dock_color == "shirt") {
                f = stof(getplayerkey(player_localentnum - 1, "colors"));
                color = colormapPaletteColor(floor(f / 16), 0);
        else if(autocvar_hud_dock_color == "shirt") {
                f = stof(getplayerkey(player_localentnum - 1, "colors"));
                color = colormapPaletteColor(floor(f / 16), 0);