pressedWithinRect() 공개 정적인 메소드

public static pressedWithinRect ( Rect rect ) : bool
rect Rect
리턴 bool
예제 #1
0
 static public int pressedWithinRect_s(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.Rect a1;
         checkValueType(l, 1, out a1);
         var ret = LTGUI.pressedWithinRect(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
예제 #2
0
    public static bool hasNoOverlap(Rect rect, int depth)
    {
        LTGUI.initRectCheck();
        bool result = true;
        bool flag   = false;

        for (int i = 0; i < LTGUI.buttonLevels.Length; i++)
        {
            if (LTGUI.buttonLevels[i] >= 0)
            {
                if (LTGUI.buttonLastFrame[i] + 1 < Time.frameCount)
                {
                    LTGUI.buttonLevels[i] = -1;
                }
                else if (LTGUI.buttonLevels[i] > depth && LTGUI.pressedWithinRect(LTGUI.buttons[i]))
                {
                    result = false;
                }
            }
            if (!flag && LTGUI.buttonLevels[i] < 0)
            {
                flag = true;
                LTGUI.buttonLevels[i]    = depth;
                LTGUI.buttons[i]         = rect;
                LTGUI.buttonLastFrame[i] = Time.frameCount;
            }
        }
        return(result);
    }
예제 #3
0
 static public int pressedWithinRect_s(IntPtr l)
 {
     try {
         UnityEngine.Rect a1;
         checkValueType(l, 1, out a1);
         var ret = LTGUI.pressedWithinRect(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }