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

            notificationGui.closeNotification();
            yield break;
        }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
 internal void notificationClosed(NotificationGUI notification)
 {
     openNotifications.Remove(notification);
     relayoutNotifications();
 }