static StackObject *AssignFromStack_fitScreen_2(ref object o, ILIntepreter __intp, StackObject *ptr_of_this_method, IList <object> __mStack)
 {
     ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
     FairyGUI.FitScreen @fitScreen = (FairyGUI.FitScreen) typeof(FairyGUI.FitScreen).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 20);
     ((FairyGUI.UIPanel)o).fitScreen = @fitScreen;
     return(ptr_of_this_method);
 }
Example #2
0
    static int set_fitScreen(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.UIPanel   obj  = (FairyGUI.UIPanel)o;
            FairyGUI.FitScreen arg0 = (FairyGUI.FitScreen)ToLua.CheckObject(L, 2, typeof(FairyGUI.FitScreen));
            obj.fitScreen = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index fitScreen on a nil value" : e.Message));
        }
    }
Example #3
0
    static int get_fitScreen(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.UIPanel   obj = (FairyGUI.UIPanel)o;
            FairyGUI.FitScreen ret = obj.fitScreen;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index fitScreen on a nil value" : e.Message));
        }
    }
Example #4
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            FairyGUI.UIPanel panel = target as FairyGUI.UIPanel;
#if (UNITY_5 || UNITY_5_3_OR_NEWER)
            DrawPropertiesExcluding(serializedObject, propertyToExclude);
#endif
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PrefixLabel("Package Name");
            if (GUILayout.Button(packageName.stringValue, "ObjectField"))
            {
                EditorWindow.GetWindow <PackagesWindow>(true, "Select a UI Component").SetSelection(packageName.stringValue, componentName.stringValue);
            }

            if (GUILayout.Button("Clear", GUILayout.Width(50)))
            {
                bool isPrefab = PrefabUtility.GetPrefabType(panel) == PrefabType.Prefab;
                panel.SendMessage("OnUpdateSource", new object[] { null, null, null, !isPrefab });

#if UNITY_5_3_OR_NEWER
                EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
#elif UNITY_5
                EditorApplication.MarkSceneDirty();
#else
                EditorUtility.SetDirty(panel);
#endif
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PrefixLabel("Component Name");
            if (GUILayout.Button(componentName.stringValue, "ObjectField"))
            {
                EditorWindow.GetWindow <PackagesWindow>(true, "Select a UI Component").SetSelection(packageName.stringValue, componentName.stringValue);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.PropertyField(renderMode);
            if ((RenderMode)renderMode.enumValueIndex != RenderMode.ScreenSpaceOverlay)
            {
                EditorGUILayout.PropertyField(renderCamera);
            }
            int oldSortingOrder = panel.sortingOrder;
            EditorGUILayout.PropertyField(sortingOrder);
            EditorGUILayout.PropertyField(fairyBatching);
            EditorGUILayout.PropertyField(hitTestMode);
            EditorGUILayout.PropertyField(touchDisabled);
            EditorGUILayout.PropertyField(setNativeChildrenOrder);
            EditorGUILayout.LabelField("UI Transform", (GUIStyle)"OL Title");
            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PropertyField(position);
            EditorGUILayout.PropertyField(rotation);
            EditorGUILayout.PropertyField(scale);
            EditorGUILayout.Space();

            FairyGUI.FitScreen oldFitScreen = (FairyGUI.FitScreen)fitScreen.enumValueIndex;
            EditorGUILayout.PropertyField(fitScreen);

            if (serializedObject.ApplyModifiedProperties())
            {
                if (PrefabUtility.GetPrefabType(panel) != PrefabType.Prefab)
                {
                    panel.ApplyModifiedProperties(sortingOrder.intValue != oldSortingOrder, (FairyGUI.FitScreen)fitScreen.enumValueIndex != oldFitScreen);
                }
            }
        }