FindSelectableOnRight() public method

public FindSelectableOnRight ( ) : Selectable
return Selectable
コード例 #1
0
 static public int FindSelectableOnRight(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.UI.Selectable self = (UnityEngine.UI.Selectable)checkSelf(l);
         var ret = self.FindSelectableOnRight();
         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
 static int FindSelectableOnRight(IntPtr L)
 {
     L.ChkArgsCount(1);
     UnityEngine.UI.Selectable obj = (UnityEngine.UI.Selectable)L.ChkUnityObjectSelf(1, "UnityEngine.UI.Selectable");
     UnityEngine.UI.Selectable o   = obj.FindSelectableOnRight();
     L.PushLightUserData(o);
     return(1);
 }
コード例 #3
0
 static int FindSelectableOnRight(IntPtr L)
 {
     LuaScriptMgr.CheckArgsCount(L, 1);
     UnityEngine.UI.Selectable obj = (UnityEngine.UI.Selectable)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.UI.Selectable");
     UnityEngine.UI.Selectable o   = obj.FindSelectableOnRight();
     LuaScriptMgr.Push(L, o);
     return(1);
 }
コード例 #4
0
 private Selectable Next(Selectable current)
 {
     switch (Direction)
     {
         case DirectionEnum.UpDown:
             return current.FindSelectableOnDown();
         case DirectionEnum.LeftRight:
             return current.FindSelectableOnRight();
     }
     return current.FindSelectableOnDown();
 }
コード例 #5
0
 static public int FindSelectableOnRight(IntPtr l)
 {
     try {
         UnityEngine.UI.Selectable self = (UnityEngine.UI.Selectable)checkSelf(l);
         var ret = self.FindSelectableOnRight();
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #6
0
	static public int FindSelectableOnRight(IntPtr l) {
		try {
			UnityEngine.UI.Selectable self=(UnityEngine.UI.Selectable)checkSelf(l);
			var ret=self.FindSelectableOnRight();
			pushValue(l,ret);
			return 1;
		}
		catch(Exception e) {
			LuaDLL.luaL_error(l, e.ToString());
			return 0;
		}
	}
コード例 #7
0
 static int QPYX_FindSelectableOnRight_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 1);
         UnityEngine.UI.Selectable QPYX_obj_YXQP = (UnityEngine.UI.Selectable)ToLua.CheckObject <UnityEngine.UI.Selectable>(L_YXQP, 1);
         UnityEngine.UI.Selectable QPYX_o_YXQP   = QPYX_obj_YXQP.FindSelectableOnRight();
         ToLua.Push(L_YXQP, QPYX_o_YXQP);
         return(1);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
コード例 #8
0
 static int FindSelectableOnRight(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.UI.Selectable obj = (UnityEngine.UI.Selectable)ToLua.CheckObject(L, 1, typeof(UnityEngine.UI.Selectable));
         UnityEngine.UI.Selectable o   = obj.FindSelectableOnRight();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #9
0
ファイル: pb_GUIUtility.cs プロジェクト: procore3d/giles
		/**
		 * Get the next selectable to the right, or if null, the next selectable down and left-most.
		 */
		public static Selectable GetNextSelectable(Selectable current)
		{
			if(current == null)
				return null;

			Selectable next = current.FindSelectableOnRight();

			if(next != null)
			{
				return next;
			}
			else
			{
				next = current.FindSelectableOnDown();

				if(next == null)
					return null;

				Selectable left = next;

				while(next != null)
				{
					left = left.FindSelectableOnLeft();

					if(left == null)
						return next;

					next = left;
				}
			}

			return null;
		}
コード例 #10
0
        private static void DrawNavigationForSelectable(Selectable sel)
        {
            if (sel == null)
                return;

            Transform transform = sel.transform;
            bool active = Selection.transforms.Any(e => e == transform);
            Handles.color = new Color(1.0f, 0.9f, 0.1f, active ? 1.0f : 0.4f);
            DrawNavigationArrow(-Vector2.right, sel, sel.FindSelectableOnLeft());
            DrawNavigationArrow(Vector2.right, sel, sel.FindSelectableOnRight());
            DrawNavigationArrow(Vector2.up, sel, sel.FindSelectableOnUp());
            DrawNavigationArrow(-Vector2.up, sel, sel.FindSelectableOnDown());
        }
コード例 #11
0
 private static void DrawNavigationForSelectable(Selectable sel)
 {
   // ISSUE: object of a compiler-generated type is created
   // ISSUE: variable of a compiler-generated type
   SelectableEditor.\u003CDrawNavigationForSelectable\u003Ec__AnonStorey1 selectableCAnonStorey1 = new SelectableEditor.\u003CDrawNavigationForSelectable\u003Ec__AnonStorey1();
   if ((UnityEngine.Object) sel == (UnityEngine.Object) null)
     return;
   // ISSUE: reference to a compiler-generated field
   selectableCAnonStorey1.transform = sel.transform;
   // ISSUE: reference to a compiler-generated method
   Handles.color = new Color(1f, 0.9f, 0.1f, !((IEnumerable<Transform>) Selection.transforms).Any<Transform>(new Func<Transform, bool>(selectableCAnonStorey1.\u003C\u003Em__0)) ? 0.4f : 1f);
   SelectableEditor.DrawNavigationArrow(-Vector2.right, sel, sel.FindSelectableOnLeft());
   SelectableEditor.DrawNavigationArrow(Vector2.right, sel, sel.FindSelectableOnRight());
   SelectableEditor.DrawNavigationArrow(Vector2.up, sel, sel.FindSelectableOnUp());
   SelectableEditor.DrawNavigationArrow(-Vector2.up, sel, sel.FindSelectableOnDown());
 }