static public int FindSelectableOnDown(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.Slider self = (UnityEngine.UI.Slider)checkSelf(l);
         var ret = self.FindSelectableOnDown();
         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 FindSelectableOnDown(IntPtr L)
 {
     L.ChkArgsCount(1);
     UnityEngine.UI.Slider     obj = (UnityEngine.UI.Slider)L.ChkUnityObjectSelf(1, "UnityEngine.UI.Slider");
     UnityEngine.UI.Selectable o   = obj.FindSelectableOnDown();
     L.PushLightUserData(o);
     return(1);
 }
 static int FindSelectableOnDown(IntPtr L)
 {
     LuaScriptMgr.CheckArgsCount(L, 1);
     UnityEngine.UI.Slider     obj = (UnityEngine.UI.Slider)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.UI.Slider");
     UnityEngine.UI.Selectable o   = obj.FindSelectableOnDown();
     LuaScriptMgr.Push(L, o);
     return(1);
 }
Exemplo n.º 4
0
 static public int FindSelectableOnDown(IntPtr l)
 {
     try {
         UnityEngine.UI.Slider self = (UnityEngine.UI.Slider)checkSelf(l);
         var ret = self.FindSelectableOnDown();
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 5
0
 static public int FindSelectableOnDown(IntPtr l)
 {
     try{
         UnityEngine.UI.Slider     self = (UnityEngine.UI.Slider)checkSelf(l);
         UnityEngine.UI.Selectable ret  = self.FindSelectableOnDown();
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 static int QPYX_FindSelectableOnDown_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 1);
         UnityEngine.UI.Slider     QPYX_obj_YXQP = (UnityEngine.UI.Slider)ToLua.CheckObject <UnityEngine.UI.Slider>(L_YXQP, 1);
         UnityEngine.UI.Selectable QPYX_o_YXQP   = QPYX_obj_YXQP.FindSelectableOnDown();
         ToLua.Push(L_YXQP, QPYX_o_YXQP);
         return(1);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Exemplo n.º 7
0
 static int FindSelectableOnDown(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.UI.Slider     obj = (UnityEngine.UI.Slider)ToLua.CheckObject <UnityEngine.UI.Slider>(L, 1);
         UnityEngine.UI.Selectable o   = obj.FindSelectableOnDown();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 8
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            EditorGUILayout.Space();
            this.serializedObject.Update();
            EditorGUILayout.PropertyField(this.m_FillRect);
            EditorGUILayout.PropertyField(this.m_HandleRect);
            if (this.m_FillRect.objectReferenceValue != (Object)null || this.m_HandleRect.objectReferenceValue != (Object)null)
            {
                EditorGUI.BeginChangeCheck();
                EditorGUILayout.PropertyField(this.m_Direction);
                if (EditorGUI.EndChangeCheck())
                {
                    UnityUI.Slider.Direction enumValueIndex = (UnityUI.Slider.Direction) this.m_Direction.enumValueIndex;
                    foreach (Object targetObject in this.serializedObject.targetObjects)
                    {
                        (targetObject as UnityUI.Slider).SetDirection(enumValueIndex, true);
                    }
                }
                EditorGUILayout.PropertyField(this.m_MinValue);
                EditorGUILayout.PropertyField(this.m_MaxValue);
                EditorGUILayout.PropertyField(this.m_WholeNumbers);
                EditorGUILayout.Slider(this.m_Value, this.m_MinValue.floatValue, this.m_MaxValue.floatValue);
                EditorGUILayout.PropertyField(this.m_Label);
                bool flag = false;
                foreach (Object targetObject in this.serializedObject.targetObjects)
                {
                    UnityUI.Slider slider = targetObject as UnityUI.Slider;
                    switch (slider.direction)
                    {
                    case UnityUI.Slider.Direction.LeftToRight:
                    case UnityUI.Slider.Direction.RightToLeft:
                        flag = slider.navigation.mode != UnityUI.Navigation.Mode.Automatic && ((Object)slider.FindSelectableOnLeft() != (Object)null || (Object)slider.FindSelectableOnRight() != (Object)null);
                        break;

                    default:
                        flag = slider.navigation.mode != UnityUI.Navigation.Mode.Automatic && ((Object)slider.FindSelectableOnDown() != (Object)null || (Object)slider.FindSelectableOnUp() != (Object)null);
                        break;
                    }
                }
                if (flag)
                {
                    EditorGUILayout.HelpBox("The selected slider direction conflicts with navigation. Not all navigation options may work.", MessageType.Warning);
                }
                EditorGUILayout.Space();
                EditorGUILayout.PropertyField(this.m_OnValueChanged);
            }
            else
            {
                EditorGUILayout.HelpBox("Specify a RectTransform for the slider fill or the slider handle or both. Each must have a parent RectTransform that it can slide within.", MessageType.Info);
            }
            this.serializedObject.ApplyModifiedProperties();
        }