예제 #1
0
 public void ShowContent(LayoutContent con)
 {
     if (Current != null)
     {
         Current.model.activeSelf = false;
     }
     Current = con;
     if (Current != null)
     {
         Current.model.activeSelf = true;
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
 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;
 }
예제 #4
0
 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;
 }
예제 #5
0
 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();
         }
     }
 }