Esempio n. 1
0
        public static void EditorResetByAlignBase(AlignedBox box, Transform alignBase)
        {
            if (!box)
            {
                return;
            }

            box.OnEditorResetByAlignBase(alignBase);
        }
Esempio n. 2
0
        public static void EditorReset(AlignedBox box, IEnumerable <Transform> elems)
        {
            if (!box)
            {
                return;
            }

            box.OnEditorReset(elems);
        }
Esempio n. 3
0
        /// <summary>
        /// For SharedStatus
        /// </summary>
        void EditorCheckForMissing()
        {
            var alignBase = this.AlignBase;

            if (alignBase && 0 < this.ElementsCount)
            {
                var cache = this.Elements[0];
                if (!cache)
                {
                    AlignedBox.EditorResetByAlignBase(this, alignBase);
                }
            }
        }
Esempio n. 4
0
        public static void UpdateAlignmentAndLayout(AlignedBox box, IEnumerable <ILayoutController> layouts)
        {
            if (null != layouts)
            {
                var enumerator = layouts.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    var layout = enumerator.Current;
                    if (null == layout)
                    {
                        continue;
                    }

                    layout.SetLayoutHorizontal();
                    layout.SetLayoutVertical();
                }
            }

            if (box)
            {
                box.UpdateAlignment();
            }
        }