static public int FindSelectableOnUp(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.FindSelectableOnUp(); 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 }
static int FindSelectableOnUp(IntPtr L) { L.ChkArgsCount(1); UnityEngine.UI.Selectable obj = (UnityEngine.UI.Selectable)L.ChkUnityObjectSelf(1, "UnityEngine.UI.Selectable"); UnityEngine.UI.Selectable o = obj.FindSelectableOnUp(); L.PushLightUserData(o); return(1); }
static int FindSelectableOnUp(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.FindSelectableOnUp(); LuaScriptMgr.Push(L, o); return(1); }
static public int FindSelectableOnUp(IntPtr l) { try { UnityEngine.UI.Selectable self = (UnityEngine.UI.Selectable)checkSelf(l); var ret = self.FindSelectableOnUp(); pushValue(l, ret); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int FindSelectableOnUp(IntPtr l) { try { UnityEngine.UI.Selectable self=(UnityEngine.UI.Selectable)checkSelf(l); var ret=self.FindSelectableOnUp(); pushValue(l,ret); return 1; } catch(Exception e) { LuaDLL.luaL_error(l, e.ToString()); return 0; } }
static int QPYX_FindSelectableOnUp_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.FindSelectableOnUp(); ToLua.Push(L_YXQP, QPYX_o_YXQP); return(1); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static int FindSelectableOnUp(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.FindSelectableOnUp(); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
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()); }
/// <summary> /// Shows a specific panel. /// </summary> /// <param name="panelName"> The requested panel name.</param> public void ShowPanel(String panelName) { currentSelected = null; GameObject currentPanel = transform.FindChild (panelName).gameObject; currentPanel.SetActive (true); foreach (Transform t in currentPanel.transform) { // Activate the game panel. t.gameObject.SetActive(true); // Find any selectable object. if (currentSelected == null) { currentSelected = t.gameObject.GetComponent<Selectable>(); } } lowestSelectable = currentSelected; highestSelectable = currentSelected; while (lowestSelectable.FindSelectableOnDown() != null) { lowestSelectable = lowestSelectable.FindSelectableOnDown(); } while (highestSelectable.FindSelectableOnUp() != null) { highestSelectable = highestSelectable.FindSelectableOnUp(); } currentSelected = highestSelectable; // This is necessary to refresh the selected game object if the same was already selected. if (eventSystem.currentSelectedGameObject == highestSelectable.gameObject) { eventSystem.SetSelectedGameObject (lowestSelectable.gameObject); } eventSystem.SetSelectedGameObject (highestSelectable.gameObject); // This is necessary to reopen any cute menu elements that are not option panels. foreach (Transform t in gameObject.transform) { if (!(t.gameObject.name.ToLower().Contains("panel"))) { t.gameObject.SetActive(true); } } }
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()); }