FairyGUI.ScrollPane.IsChildInView C# (CSharp) Method

IsChildInView() public method

public IsChildInView ( GObject obj ) : bool
obj GObject obj must be the direct child of this container
return bool
        public bool IsChildInView(GObject obj)
        {
            if (_yOverlap > 0)
            {
                float dist = obj.y + _container.y;
                if (dist < -obj.height - 20 || dist > _viewHeight + 20)
                    return false;
            }
            if (_xOverlap > 0)
            {
                float dist = obj.x + _container.x;
                if (dist < -obj.width - 20 || dist > _viewWidth + 20)
                    return false;
            }

            return true;
        }

Usage Example

Example #1
0
 static public int IsChildInView(IntPtr l)
 {
     try {
         FairyGUI.ScrollPane self = (FairyGUI.ScrollPane)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.ScrollPane::IsChildInView