From: terencehill Date: Thu, 5 Feb 2015 14:52:06 +0000 (+0100) Subject: Revert 855007679 as it caused bug #1453 "Advanced settings dialog does not close... X-Git-Tag: xonotic-v0.8.1~122^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=12d7404697498242d5b619ea47ed1bd7e54f8b65;p=xonotic%2Fxonotic-data.pk3dir.git Revert 855007679 as it caused bug #1453 "Advanced settings dialog does not close after pressing OK" --- diff --git a/qcsrc/menu/item/modalcontroller.qc b/qcsrc/menu/item/modalcontroller.qc index bff217079..3ef656744 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);