Ejemplo n.º 1
0
        public static void UnregisterInterface(FoveInterface xface)
        {
            if (m_interfaceStacks == null)
            {
                return;
            }

            int layerId = -1;
            List <FoveInterface> theStack = null;

            foreach (var list in m_interfaceStacks)
            {
                if (list.Value.Contains(xface))
                {
                    layerId  = list.Key;
                    theStack = list.Value;
                    theStack.Remove(xface);
                    return;
                }
            }

            if (layerId > -1)
            {
                if (m_topInterfaces == null)
                {
                    m_topInterfaces = new Dictionary <int, FoveInterface>();
                }
                m_topInterfaces[layerId] = theStack[theStack.Count - 1];
            }
        }
Ejemplo n.º 2
0
        internal static void UnregisterInterface(FoveInterface xface)
        {
            var unregisteredMatch = m_sUnregisteredInterfaces.FirstOrDefault(i => i.xface == xface);

            if (unregisteredMatch != null)
            {
                m_sUnregisteredInterfaces.Remove(unregisteredMatch);
            }

            var layerIds = m_sInterfaceStacks.Keys.ToList();

            foreach (var layerId in layerIds)
            {
                var interfaces      = m_sInterfaceStacks[layerId];
                var registeredMatch = interfaces.FirstOrDefault(i => i.xface == xface);
                if (registeredMatch != null)
                {
                    interfaces.Remove(registeredMatch);
                }

                if (interfaces.Count == 0)
                {
                    UnityFuncs.DeleteLayer(layerId);
                    m_sInterfaceStacks.Remove(layerId);
                }
            }
        }
Ejemplo n.º 3
0
        internal static void RegisterInterface(CompositorLayerCreateInfo info, FoveInterface xface)
        {
            if (Instance == null)             // query forces it to exist
            {
                return;
            }

            unregisteredInterfaces.Add(new InterfaceInfo {
                info = info, xface = xface
            });
        }
Ejemplo n.º 4
0
        internal static void UnregisterInterface(FoveInterface xface)
        {
            var unregisteredMatch = unregisteredInterfaces.FirstOrDefault(i => i.xface == xface);

            if (unregisteredMatch != null)
            {
                unregisteredInterfaces.Remove(unregisteredMatch);
            }

            foreach (var list in m_interfaceStacks.Values)
            {
                var registeredMatch = list.FirstOrDefault(i => i.xface == xface);
                if (registeredMatch != null)
                {
                    list.Remove(registeredMatch);
                }
            }
        }
Ejemplo n.º 5
0
 public static bool IsLast(int layerId, FoveInterface xface)
 {
     return(m_topInterfaces[layerId] == xface);
 }