예제 #1
0
파일: DialogOverlay.cs 프로젝트: swt369/osu
        private void onDialogOnStateChanged(OverlayContainer dialog, Visibility v)
        {
            if (v != Visibility.Hidden)
            {
                return;
            }

            //handle the dialog being dismissed.
            dialog.Delay(PopupDialog.EXIT_DURATION);
            dialog.Expire();

            if (dialog == currentDialog)
            {
                State = Visibility.Hidden;
            }
        }
예제 #2
0
        // in the blocking methods below it is important to be careful about threading (e.g. use `Expire()` rather than `Remove()`, and schedule transforms),
        // because in the worst case the clean-up methods could be called from async disposal.

        IDisposable IOverlayManager.RegisterBlockingOverlay(OverlayContainer overlayContainer)
        {
            overlayContent.Add(overlayContainer);
            return(new InvokeOnDisposal(() => overlayContainer.Expire()));
        }