Exemplo n.º 1
0
        public void Add(FGUI ui, UILayer layer = UILayer.Mid, bool asChildGObject = true)
        {
            var layerUI = Root?.Get(layer.ToString());

            if (layerUI != null)
            {
                layerUI.Add(ui, asChildGObject);
            }
        }
Exemplo n.º 2
0
        /*public FGUI[] GetAll()
         * {
         *  return
         * }*/

        public void Clear(UILayer layer = UILayer.All)
        {
            if (layer == UILayer.All)
            {
                for (int i = 0; i < (int)UILayer.All; i++)
                {
                    Clear((UILayer)i);
                }
            }
            else
            {
                Root?.Get(layer.ToString()).RemoveChildren();
            }
        }
Exemplo n.º 3
0
 public void Remove(string name, UILayer layer = UILayer.All)
 {
     if (layer == UILayer.All)
     {
         for (int i = 0; i < (int)UILayer.All; i++)
         {
             Remove(name, (UILayer)i);
         }
     }
     else
     {
         var UIlayer = Root?.Get(layer.ToString());
         UIlayer?.Remove(name);
     }
 }
Exemplo n.º 4
0
 public FGUI Get(string name, UILayer layer = UILayer.All)
 {
     if (layer == UILayer.All)
     {
         for (int i = 0; i < (int)UILayer.All; i++)
         {
             var l = Get(name, (UILayer)i);
             if (l != null)
             {
                 return(l);
             }
         }
     }
     else
     {
         var UIlayer = Root?.Get(layer.ToString());
         return(UIlayer?.Get(name));
     }
     return(null);
 }