]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert 855007679 as it caused bug #1453 "Advanced settings dialog does not close...
authorterencehill <piuntn@gmail.com>
Thu, 5 Feb 2015 14:52:06 +0000 (15:52 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 5 Feb 2015 14:52:06 +0000 (15:52 +0100)
qcsrc/menu/item/modalcontroller.qc

index bff21707906c9919927ce8557a5934aacbaa4bff..3ef656744568ad3b0ebfd25768e5acf3267fbfe5 100644 (file)
@@ -150,22 +150,11 @@ void ModalController_draw(entity me)
                if(e.ModalController_state)
                {
                        if(front)
-                       {
                                me.switchState(me, front, 2, 0);
-                               if(front.ModalController_factor < 1)
-                                       animating = 1;
-                       }
                        front = e;
                }
        if(front)
-       {
                me.switchState(me, front, 1, 0);
-               if(front.ModalController_factor < 1)
-                       animating = 1;
-       }
-
-       if(front && front.Container_alpha == front.ModalController_initialAlpha)
-               goto update_done; // update isn't needed, everything stay as is
 
        df = frametime * 3; // animation speed
 
@@ -209,6 +198,7 @@ void ModalController_draw(entity me)
                                me.setAlphaOf(me, e, e.Container_alpha  * prevFactor);
                        else
                        {
+                               animating = 1;
                                targetFactor = df / (1 - f + df);
 
                                if(e.ModalController_state == 1)
@@ -234,7 +224,6 @@ void ModalController_draw(entity me)
                        e.Container_fontscale_y = fs.y * e.ModalController_initialFontScale.y;
                }
        }
-       :update_done
 
        if(animating || !me.focused)
                me.setFocus(me, NULL);