Exemple #1
0
        private IEnumerator <YieldAction> timedNotification(NotificationGUI notificationGui, double waitTime)
        {
            yield return(Coroutine.WaitSeconds(waitTime));

            notificationGui.closeNotification();
            yield break;
        }
Exemple #2
0
        public void showNotification(Notification notification)
        {
            NotificationGUI notificationGUI = new NotificationGUI(notification, this);

            positionNotification(notificationGUI);
            if (notification.Timeout > 0.0)
            {
                Coroutine.Start(timedNotification(notificationGUI, notification.Timeout));
            }
        }
Exemple #3
0
        private void positionNotification(NotificationGUI notification)
        {
            int additionalHeightOffset = layoutContainer.Location.y;

            foreach (NotificationGUI openNotification in openNotifications)
            {
                additionalHeightOffset += openNotification.Height;
            }
            openNotifications.Add(notification);
            notification.show(Right - notification.Width, additionalHeightOffset);
        }
Exemple #4
0
 internal void notificationClosed(NotificationGUI notification)
 {
     openNotifications.Remove(notification);
     relayoutNotifications();
 }