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); } }
/*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(); } }
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); } }
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); }