static int _g_get_childForceExpandHeight(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.UI.HorizontalOrVerticalLayoutGroup __cl_gen_to_be_invoked = (UnityEngine.UI.HorizontalOrVerticalLayoutGroup)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, __cl_gen_to_be_invoked.childForceExpandHeight);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
        private void GetDependencies()
        {
            layoutGroup = GetComponent <UnityEngine.UI.HorizontalOrVerticalLayoutGroup>();
            int length = transform.childCount;

            children = new T[length];
            for (int i = 0; i < length; i++)
            {
                children[i]       = transform.GetChild(i).gameObject.GetComponent <T>();
                children[i].Index = i;
            }
        }
        static int _s_set_childControlWidth(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.UI.HorizontalOrVerticalLayoutGroup __cl_gen_to_be_invoked = (UnityEngine.UI.HorizontalOrVerticalLayoutGroup)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.childControlWidth = LuaAPI.lua_toboolean(L, 2);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
        static int _g_get_spacing(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UnityEngine.UI.HorizontalOrVerticalLayoutGroup gen_to_be_invoked = (UnityEngine.UI.HorizontalOrVerticalLayoutGroup)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushnumber(L, gen_to_be_invoked.spacing);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
        static int _s_set_reverseArrangement(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UnityEngine.UI.HorizontalOrVerticalLayoutGroup gen_to_be_invoked = (UnityEngine.UI.HorizontalOrVerticalLayoutGroup)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.reverseArrangement = LuaAPI.lua_toboolean(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
 public override void ReadFrom(object obj)
 {
     base.ReadFrom(obj);
     if (obj == null)
     {
         return;
     }
     UnityEngine.UI.HorizontalOrVerticalLayoutGroup o = (UnityEngine.UI.HorizontalOrVerticalLayoutGroup)obj;
     spacing = o.spacing;
     childForceExpandWidth  = o.childForceExpandWidth;
     childForceExpandHeight = o.childForceExpandHeight;
     childControlWidth      = o.childControlWidth;
     childControlHeight     = o.childControlHeight;
 }
 public override object WriteTo(object obj, System.Collections.Generic.Dictionary <long, UnityEngine.Object> objects)
 {
     obj = base.WriteTo(obj, objects);
     if (obj == null)
     {
         return(null);
     }
     UnityEngine.UI.HorizontalOrVerticalLayoutGroup o = (UnityEngine.UI.HorizontalOrVerticalLayoutGroup)obj;
     o.spacing = spacing;
     o.childForceExpandWidth  = childForceExpandWidth;
     o.childForceExpandHeight = childForceExpandHeight;
     o.childControlWidth      = childControlWidth;
     o.childControlHeight     = childControlHeight;
     return(o);
 }
        static StackObject *get_childForceExpandWidth_2(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.UI.HorizontalOrVerticalLayoutGroup instance_of_this_method = (UnityEngine.UI.HorizontalOrVerticalLayoutGroup) typeof(UnityEngine.UI.HorizontalOrVerticalLayoutGroup).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.childForceExpandWidth;

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method ? 1 : 0;
            return(__ret + 1);
        }
        static StackObject *get_spacing_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.UI.HorizontalOrVerticalLayoutGroup instance_of_this_method = (UnityEngine.UI.HorizontalOrVerticalLayoutGroup) typeof(UnityEngine.UI.HorizontalOrVerticalLayoutGroup).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.spacing;

            __ret->ObjectType       = ObjectTypes.Float;
            *(float *)&__ret->Value = result_of_this_method;
            return(__ret + 1);
        }
        static StackObject *set_spacing_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Single @value = *(float *)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.UI.HorizontalOrVerticalLayoutGroup instance_of_this_method = (UnityEngine.UI.HorizontalOrVerticalLayoutGroup) typeof(UnityEngine.UI.HorizontalOrVerticalLayoutGroup).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.spacing = value;

            return(__ret);
        }
        static StackObject *set_childForceExpandHeight_5(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Boolean @value = ptr_of_this_method->Value == 1;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.UI.HorizontalOrVerticalLayoutGroup instance_of_this_method = (UnityEngine.UI.HorizontalOrVerticalLayoutGroup) typeof(UnityEngine.UI.HorizontalOrVerticalLayoutGroup).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.childForceExpandHeight = value;

            return(__ret);
        }
예제 #12
0
        public void DrawLayer(Layer layer, GameObject parent)
        {
            GameObject temp;
            string     type = layer.arguments[0].ToUpper();

            switch (type.ToUpper())
            {
            case "V":
                temp = AssetDatabase.LoadAssetAtPath(PSDImporterConst.ASSET_PATH_GROUP_V, typeof(GameObject)) as GameObject;
                break;

            case "H":
                temp = AssetDatabase.LoadAssetAtPath(PSDImporterConst.ASSET_PATH_GROUP_H, typeof(GameObject)) as GameObject;
                break;

            default:
                return;
            }

            UnityEngine.UI.HorizontalOrVerticalLayoutGroup group = GameObject.Instantiate(temp).GetComponent <UnityEngine.UI.HorizontalOrVerticalLayoutGroup>(); //as UnityEngine.UI.HorizontalOrVerticalLayoutGroup;
            group.transform.SetParent(parent.transform, false);                                                                                                  //parent = parent.transform;

            RectTransform rectTransform = group.GetComponent <RectTransform>();

            rectTransform.sizeDelta        = new Vector2(layer.size.width, layer.size.height);
            rectTransform.anchoredPosition = new Vector2(layer.position.x, layer.position.y);

            float span;

            if (float.TryParse(layer.arguments[1], out span))
            {
                group.spacing = span;
            }

            pSDImportCtrl.DrawLayers(layer.layers, group.gameObject);
        }