Ejemplo n.º 1
0
        public void Remove(MyHudNotificationBase notification)
        {
            if (notification == null)
            {
                return;
            }

            var group = GetNotificationGroup(notification.Priority);

            //Debug.Assert(group.Contains(notification));
            group.Remove(notification);
        }
Ejemplo n.º 2
0
        public void Add(MyHudNotificationBase notification)
        {
            Debug.Assert(notification != null);
            Debug.Assert(notification.Priority <= MAX_PRIORITY);
            Debug.Assert(notification.Priority >= 0);
            var group = GetNotificationGroup(notification.Priority);

            if (!group.Contains(notification))
            {
                notification.BeforeAdd();
                group.Add(notification);
            }
            notification.ResetAliveTime();
        }
Ejemplo n.º 3
0
        private bool IsDrawn(MyHudNotificationBase notification)
        {
            bool isDrawn = notification.Alive;

            if (notification.IsControlsHint)
            {
                isDrawn = isDrawn && MySandboxGame.Config.ControlsHints;
            }
            if (MyHud.MinimalHud && notification.Level != MyNotificationLevel.Important)
            {
                isDrawn = false;
            }

            return(isDrawn);
        }
Ejemplo n.º 4
0
        private bool IsDrawn(MyHudNotificationBase notification)
        {
            bool isDrawn = notification.Alive;
            if (notification.IsControlsHint)
                isDrawn = isDrawn && MySandboxGame.Config.ControlsHints;
            if (MyHud.MinimalHud && notification.Level != MyNotificationLevel.Important)
                isDrawn = false;

            return isDrawn;
        }
Ejemplo n.º 5
0
 public void Register(MyNotificationSingletons singleton, MyHudNotificationBase notification)
 {
     m_singletons[(int)singleton] = notification;
 }
Ejemplo n.º 6
0
        public void Remove(MyHudNotificationBase notification)
        {
            if (notification == null)
                return;

            var group = GetNotificationGroup(notification.Priority);
            //Debug.Assert(group.Contains(notification));
            group.Remove(notification);
        }
Ejemplo n.º 7
0
 public void Add(MyHudNotificationBase notification)
 {
     Debug.Assert(notification != null);
     Debug.Assert(notification.Priority <= MAX_PRIORITY);
     Debug.Assert(notification.Priority >= 0);
     var group = GetNotificationGroup(notification.Priority);
     if (!group.Contains(notification))
     {
         notification.BeforeAdd();
         group.Add(notification);
     }
     notification.ResetAliveTime();
 }
Ejemplo n.º 8
0
 public void Register(MyNotificationSingletons singleton, MyHudNotificationBase notification)
 {
     m_singletons[(int)singleton] = notification;
 }