예제 #1
0
        override protected void HandleSizeChanged()
        {
            base.HandleSizeChanged();

            if (scrollPane != null)
            {
                scrollPane.OnOwnerSizeChanged();
            }
            if (rootContainer.clipRect != null)
            {
                UpdateClipRect();
            }

            if (rootContainer.hitArea is PixelHitTest)
            {
                PixelHitTest test = (PixelHitTest)rootContainer.hitArea;
                if (sourceWidth != 0)
                {
                    test.scaleX = this.width / this.sourceWidth;
                }
                if (sourceHeight != 0)
                {
                    test.scaleY = this.height / this.sourceHeight;
                }
            }
        }
 static public int get_offsetY(IntPtr l)
 {
     try {
         FairyGUI.PixelHitTest self = (FairyGUI.PixelHitTest)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.offsetY);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_offsetX(IntPtr l)
 {
     try {
         FairyGUI.PixelHitTest self = (FairyGUI.PixelHitTest)checkSelf(l);
         System.Int32          v;
         checkType(l, 2, out v);
         self.offsetX = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int SetEnabled(IntPtr l)
 {
     try {
         FairyGUI.PixelHitTest self = (FairyGUI.PixelHitTest)checkSelf(l);
         System.Boolean        a1;
         checkType(l, 2, out a1);
         self.SetEnabled(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int HitTest(IntPtr l)
 {
     try {
         FairyGUI.PixelHitTest self = (FairyGUI.PixelHitTest)checkSelf(l);
         FairyGUI.Container    a1;
         checkType(l, 2, out a1);
         UnityEngine.Vector2 a2;
         checkType(l, 3, out a2);
         var ret = self.HitTest(a1, ref a2);
         pushValue(l, true);
         pushValue(l, ret);
         pushValue(l, a2);
         return(3);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
예제 #6
0
 virtual protected void UpdateHitArea()
 {
     if (rootContainer.hitArea is PixelHitTest)
     {
         PixelHitTest test = (PixelHitTest)rootContainer.hitArea;
         if (sourceWidth != 0)
         {
             test.scaleX = this.width / this.sourceWidth;
         }
         if (sourceHeight != 0)
         {
             test.scaleY = this.height / this.sourceHeight;
         }
     }
     else
     {
         ((RectHitTest)rootContainer.hitArea).Set(0, 0, this.width, this.height);
     }
 }
 static public int constructor(IntPtr l)
 {
     try {
         FairyGUI.PixelHitTest     o;
         FairyGUI.PixelHitTestData a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         System.Int32 a3;
         checkType(l, 4, out a3);
         o = new FairyGUI.PixelHitTest(a1, a2, a3);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }