public bool RemoveComponent(PlutonUI.BaseComponent comp) { for (int i = 0; i < components.Length; i++) { if (components[i].Obj == comp.obj) { components.Remove(i); return(true); } } return(false); }
public PlutonUI.BaseComponent AddComponent(PlutonUI.BaseComponent comp) { components.Add(comp.obj); return(comp); }
public PlutonUI.BaseComponent AddComponent <T>() where T : PlutonUI.BaseComponent { PlutonUI.BaseComponent t = Activator.CreateInstance <T>(); components.Add(t.obj); return(t); }