FairyGUI.GComponent.IsChildInView C# (CSharp) Method

IsChildInView() public method

Test if a child is in view.
public IsChildInView ( GObject child ) : bool
child GObject A child object
return bool
        public bool IsChildInView(GObject child)
        {
            if (scrollPane != null)
            {
                return scrollPane.IsChildInView(child);
            }
            else if (rootContainer.clipRect != null)
            {
                return child.x + child.width >= 0 && child.x <= this.width
                    && child.y + child.height >= 0 && child.y <= this.height;
            }
            else
                return true;
        }

Usage Example

示例#1
0
 static public int IsChildInView(IntPtr l)
 {
     try {
         FairyGUI.GComponent self = (FairyGUI.GComponent)checkSelf(l);
         FairyGUI.GObject    a1;
         checkType(l, 2, out a1);
         var ret = self.IsChildInView(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.GComponent::IsChildInView