FairyGUI.GList.AdjustItemsSize C# (CSharp) Method

AdjustItemsSize() public method

public AdjustItemsSize ( ) : void
return void
        public void AdjustItemsSize()
        {
            if (_layout == ListLayoutType.SingleColumn)
            {
                int cnt = _children.Count;
                float cw = this.viewWidth;
                for (int i = 0; i < cnt; i++)
                {
                    GObject child = GetChildAt(i);
                    child.width = cw;
                }
            }
            else if (_layout == ListLayoutType.SingleRow)
            {
                int cnt = _children.Count;
                float ch = this.viewHeight;
                for (int i = 0; i < cnt; i++)
                {
                    GObject child = GetChildAt(i);
                    child.height = ch;
                }
            }
        }

Usage Example

示例#1
0
 static public int AdjustItemsSize(IntPtr l)
 {
     try {
         FairyGUI.GList self = (FairyGUI.GList)checkSelf(l);
         self.AdjustItemsSize();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.GList::AdjustItemsSize