From 12d7404697498242d5b619ea47ed1bd7e54f8b65 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 5 Feb 2015 15:52:06 +0100 Subject: [PATCH] Revert 855007679 as it caused bug #1453 "Advanced settings dialog does not close after pressing OK" --- qcsrc/menu/item/modalcontroller.qc | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/qcsrc/menu/item/modalcontroller.qc b/qcsrc/menu/item/modalcontroller.qc index bff2170790..3ef6567445 100644 --- a/qcsrc/menu/item/modalcontroller.qc +++ b/qcsrc/menu/item/modalcontroller.qc @@ -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); -- 2.39.2