Пример #1
0
        public static void RegisterHandler(BackHandler handler)
        {
            if (!handlers.Contains(handler))
            {
                handlers.Add(handler);
            }

            TryStartUpdate();
        }
Пример #2
0
        public static int Compare(BackHandler h1, BackHandler h2)
        {
            Canvas c1 = h1.GetParentCanvas();
            Canvas c2 = h2.GetParentCanvas();

            if (c1.renderOrder != c2.renderOrder)
            {
                return(c2.renderOrder - c1.renderOrder);
            }

            return(h2.GetRelativeDepth() - h1.GetRelativeDepth());
        }
Пример #3
0
 public static void RemoveHandler(BackHandler handler)
 {
     handlers.Remove(handler);
 }