]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/item/nexposee.c
Fix weapon count when there's a complain_weapon (add it only if you don't have it!)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / item / nexposee.c
index 97eabd7d66beffd07e0263f5474a63c572db5270..0adc399e0887c45a29931df8ef3fbfd4debf09e9 100644 (file)
@@ -92,7 +92,7 @@ void Nexposee_calc(entity me)
        float scale;
        entity e, e2;
        vector emins, emaxs, e2mins, e2maxs;
-       
+
        for(scale = 0.7;; scale *= 0.99)
        {
                Nexposee_Calc_Scale(me, scale);
@@ -219,6 +219,7 @@ float Nexposee_mousePress(entity me, vector pos)
                Nexposee_mouseMove(me, pos);
                if(me.mouseFocusedChild)
                {
+                       m_play_click_sound(MENU_SOUND_OPEN);
                        me.animationState = 1;
                        SUPER(Nexposee).setFocus(me, NULL);
                }
@@ -228,8 +229,9 @@ float Nexposee_mousePress(entity me, vector pos)
        }
        else if(me.animationState == 2)
        {
-               if not(SUPER(Nexposee).mousePress(me, pos))
+               if (!(SUPER(Nexposee).mousePress(me, pos)))
                {
+                       m_play_click_sound(MENU_SOUND_CLOSE);
                        me.animationState = 3;
                        SUPER(Nexposee).setFocus(me, NULL);
                }
@@ -291,14 +293,14 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift)
                        {
                                if(me.selectedChild)
                                        me.selectedChild = me.selectedChild.prevSibling;
-                               if not(me.selectedChild)
+                               if (!me.selectedChild)
                                        me.selectedChild = me.lastChild;
                        }
                        else
                        {
                                if(me.selectedChild)
                                        me.selectedChild = me.selectedChild.nextSibling;
-                               if not(me.selectedChild)
+                               if (!me.selectedChild)
                                        me.selectedChild = me.firstChild;
                        }
                }
@@ -322,16 +324,18 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift)
                        default:
                        case 0:
                        case 3:
+                               m_play_click_sound(MENU_SOUND_OPEN);
                                me.animationState = 1;
                                break;
                        case 1:
                        case 2:
+                               m_play_click_sound(MENU_SOUND_CLOSE);
                                me.animationState = 3;
                                break;
                }
                if(me.focusedChild)
                        me.selectedChild = me.focusedChild;
-               if not(me.selectedChild)
+               if (!me.selectedChild)
                        me.animationState = 0;
                SUPER(Nexposee).setFocus(me, NULL);
                return 1;