internal LayoutCache() { this.topLevel = new GUILayoutGroup(); this.layoutGroups = new GenericStack(); this.windows = new GUILayoutGroup(); this.layoutGroups.Push(this.topLevel); }
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; }
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); } }
internal static void LayoutFreeGroup(GUILayoutGroup toplevel) { foreach (GUILayoutGroup group in toplevel.entries) { LayoutSingleGroup(group); } toplevel.ResetCursor(); }
internal LayoutCache(GUILayoutUtility.LayoutCache other) { this.topLevel = other.topLevel; this.layoutGroups = other.layoutGroups; this.windows = other.windows; }
internal static void LayoutFreeGroup(GUILayoutGroup toplevel) { using (List<GUILayoutEntry>.Enumerator enumerator = toplevel.entries.GetEnumerator()) { while (enumerator.MoveNext()) GUILayoutUtility.LayoutSingleGroup((GUILayoutGroup) enumerator.Current); } toplevel.ResetCursor(); }