Inheritance: GUILayoutEntry
コード例 #1
0
 internal LayoutCache()
 {
     this.topLevel = new GUILayoutGroup();
     this.layoutGroups = new GenericStack();
     this.windows = new GUILayoutGroup();
     this.layoutGroups.Push(this.topLevel);
 }
コード例 #2
0
 internal LayoutCache(GUILayoutUtility.LayoutCache other)
 {
     this.topLevel = new GUILayoutGroup();
     this.layoutGroups = new GenericStack();
     this.windows = new GUILayoutGroup();
     this.topLevel = other.topLevel;
     this.layoutGroups = other.layoutGroups;
     this.windows = other.windows;
 }
コード例 #3
0
 private static void LayoutSingleGroup(GUILayoutGroup i)
 {
     if (!i.isWindow)
     {
         float minWidth = i.minWidth;
         float maxWidth = i.maxWidth;
         i.CalcWidth();
         i.SetHorizontal(i.rect.x, Mathf.Clamp(i.maxWidth, minWidth, maxWidth));
         float minHeight = i.minHeight;
         float maxHeight = i.maxHeight;
         i.CalcHeight();
         i.SetVertical(i.rect.y, Mathf.Clamp(i.maxHeight, minHeight, maxHeight));
     }
     else
     {
         i.CalcWidth();
         Rect rect = Internal_GetWindowRect(i.windowID);
         i.SetHorizontal(rect.x, Mathf.Clamp(rect.width, i.minWidth, i.maxWidth));
         i.CalcHeight();
         i.SetVertical(rect.y, Mathf.Clamp(rect.height, i.minHeight, i.maxHeight));
         Internal_MoveWindow(i.windowID, i.rect);
     }
 }
コード例 #4
0
 internal static void LayoutFreeGroup(GUILayoutGroup toplevel)
 {
     foreach (GUILayoutGroup group in toplevel.entries)
     {
         LayoutSingleGroup(group);
     }
     toplevel.ResetCursor();
 }
コード例 #5
0
 internal LayoutCache(GUILayoutUtility.LayoutCache other)
 {
   this.topLevel = other.topLevel;
   this.layoutGroups = other.layoutGroups;
   this.windows = other.windows;
 }
コード例 #6
0
 internal static void LayoutFreeGroup(GUILayoutGroup toplevel)
 {
   using (List<GUILayoutEntry>.Enumerator enumerator = toplevel.entries.GetEnumerator())
   {
     while (enumerator.MoveNext())
       GUILayoutUtility.LayoutSingleGroup((GUILayoutGroup) enumerator.Current);
   }
   toplevel.ResetCursor();
 }
コード例 #7
0
 internal LayoutCache(GUILayoutUtility.LayoutCache other)
 {
     this.topLevel     = other.topLevel;
     this.layoutGroups = other.layoutGroups;
     this.windows      = other.windows;
 }