public void ShowContent(LayoutContent con) { if (Current != null) { Current.model.activeSelf = false; } Current = con; if (Current != null) { Current.model.activeSelf = true; } }
public LayoutContent AddContent(string name) { if (Current != null) { Current.Hide(); } LayoutContent content = new LayoutContent(this, name); contents.Add(content); content.name = name; content.model.name = name; Current = content; UIAnimation.Manage.FrameToDo(2, SetTextSize, null); return(content); }
public void AddContent(LayoutContent con) { if (Current != null) { Current.Hide(); } con.auxiliary = this; con.model.SetParent(content); con.Head.SetParent(head); con.Head.IsChanged = true; contents.Add(con); Current = con; panel.IsChanged = true; con.model.data.sizeDelta = content.data.sizeDelta; ModelElement.ScaleSize(con.model); con.model.IsChanged = true; con.model.activeSelf = true; }
public void AddContent(LayoutContent con) { if (Current != null) { Current.Hide(); } con.auxiliary = this; con.model.SetParent(content); con.model.Context.SetParent(content.Context); con.model.Context.localPosition = Vector3.zero; con.Head.SetParent(head); con.Head.Context.SetParent(head.Context); contents.Add(con); Current = con; panel.Order(); con.model.data.sizeDelta = content.data.sizeDelta; ModelElement.ScaleSize(con.model); con.model.activeSelf = true; }
public void RemoveContent(LayoutContent con) { con.model.SetParent(null); con.Head.SetParent(null); contents.Remove(con); if (con == Current) { if (contents.Count == 0) { layoutArea.Dispose(); layout.Refresh(); Current = null; } else { Current = contents[0]; Current.Show(); } } }