Exemplo n.º 1
0
        static StackObject *set_sortingOrder_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, 2);

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

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

            instance_of_this_method.sortingOrder = value;

            return(__ret);
        }
        static StackObject *PixelAdjustRect_11(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, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Canvas canvas = (UnityEngine.Canvas) typeof(UnityEngine.Canvas).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.RectTransform rectTransform = (UnityEngine.RectTransform) typeof(UnityEngine.RectTransform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = UnityEngine.RectTransformUtility.PixelAdjustRect(rectTransform, canvas);

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Exemplo n.º 3
0
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    UnityEngine.Canvas __cl_gen_ret = new UnityEngine.Canvas();
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
            }
            catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Canvas constructor!"));
        }
        static StackObject *set_worldCamera_30(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, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Camera @value = (UnityEngine.Camera) typeof(UnityEngine.Camera).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

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

            instance_of_this_method.worldCamera = value;

            return(__ret);
        }
Exemplo n.º 5
0
        static StackObject *set_renderMode_0(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);
            UnityEngine.RenderMode @value = (UnityEngine.RenderMode) typeof(UnityEngine.RenderMode).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 20);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Canvas instance_of_this_method = (UnityEngine.Canvas) typeof(UnityEngine.Canvas).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.renderMode = value;

            return(__ret);
        }
Exemplo n.º 6
0
        static StackObject *set_additionalShaderChannels_25(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);
            UnityEngine.AdditionalCanvasShaderChannels @value = (UnityEngine.AdditionalCanvasShaderChannels) typeof(UnityEngine.AdditionalCanvasShaderChannels).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

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

            instance_of_this_method.additionalShaderChannels = value;

            return(__ret);
        }
Exemplo n.º 7
0
        static StackObject *UnregisterGraphicForCanvas_2(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, 2);

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

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Canvas @c = (UnityEngine.Canvas) typeof(UnityEngine.Canvas).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);


            UnityEngine.UI.GraphicRegistry.UnregisterGraphicForCanvas(@c, @graphic);

            return(__ret);
        }
Exemplo n.º 8
0
        private static IntPtr Constructor(IntPtr isolate, IntPtr info, int paramLen, long data)
        {
            try
            {
                {
                    {
                        var result = new UnityEngine.Canvas();


                        return(Puerts.Utils.GetObjectPtr((int)data, typeof(UnityEngine.Canvas), result));
                    }
                }
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
            return(IntPtr.Zero);
        }
Exemplo n.º 9
0
        static StackObject *GetGraphicsForCanvas_3(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.Canvas canvas = (UnityEngine.Canvas) typeof(UnityEngine.Canvas).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = UnityEngine.UI.GraphicRegistry.GetGraphicsForCanvas(canvas);

            object obj_result_of_this_method = result_of_this_method;

            if (obj_result_of_this_method is CrossBindingAdaptorType)
            {
                return(ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance));
            }
            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
        static int _m_UnregisterGraphicForCanvas_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            try {
                {
                    UnityEngine.Canvas     c       = (UnityEngine.Canvas)translator.GetObject(L, 1, typeof(UnityEngine.Canvas));
                    UnityEngine.UI.Graphic graphic = (UnityEngine.UI.Graphic)translator.GetObject(L, 2, typeof(UnityEngine.UI.Graphic));

                    UnityEngine.UI.GraphicRegistry.UnregisterGraphicForCanvas(c, graphic);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static int _m_GetGraphicsForCanvas_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            try {
                {
                    UnityEngine.Canvas canvas = (UnityEngine.Canvas)translator.GetObject(L, 1, typeof(UnityEngine.Canvas));

                    System.Collections.Generic.IList <UnityEngine.UI.Graphic> __cl_gen_ret = UnityEngine.UI.GraphicRegistry.GetGraphicsForCanvas(canvas);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemplo n.º 12
0
        static int _m_GetObjectCanvas_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            try {
                {
                    UnityEngine.GameObject Obj = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));

                    UnityEngine.Canvas __cl_gen_ret = xc.ui.ugui.UIHelper.GetObjectCanvas(Obj);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemplo n.º 13
0
        public UnityEngine.Canvas __Gen_Delegate_Imp22(object p0)
        {
#if THREAD_SAFE || HOTFIX_ENABLE
            lock (luaEnv.luaEnvLock)
            {
#endif
            RealStatePtr L = luaEnv.rawL;
            int errFunc    = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference);
            ObjectTranslator translator = luaEnv.translator;
            translator.PushAny(L, p0);

            PCall(L, 1, 1, errFunc);


            UnityEngine.Canvas __gen_ret = (UnityEngine.Canvas)translator.GetObject(L, errFunc + 1, typeof(UnityEngine.Canvas));
            LuaAPI.lua_settop(L, errFunc - 1);
            return(__gen_ret);

#if THREAD_SAFE || HOTFIX_ENABLE
        }
#endif
        }
        static int _m_ScreenPointToLocalPos_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    UnityEngine.Canvas  __canvas = (UnityEngine.Canvas)translator.GetObject(L, 1, typeof(UnityEngine.Canvas));
                    UnityEngine.Vector3 __screenPoint; translator.Get(L, 2, out __screenPoint);

                    var gen_ret = VEFramework.HotScriptKit.LuaHelper.ScreenPointToLocalPos(__canvas, __screenPoint);
                    translator.PushUnityEngineVector3(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_PixelAdjustRect_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            try {
                {
                    UnityEngine.RectTransform rectTransform = (UnityEngine.RectTransform)translator.GetObject(L, 1, typeof(UnityEngine.RectTransform));
                    UnityEngine.Canvas        canvas        = (UnityEngine.Canvas)translator.GetObject(L, 2, typeof(UnityEngine.Canvas));

                    UnityEngine.Rect __cl_gen_ret = UnityEngine.RectTransformUtility.PixelAdjustRect(rectTransform, canvas);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemplo n.º 16
0
 public override void ReadFrom(object obj)
 {
     base.ReadFrom(obj);
     if (obj == null)
     {
         return;
     }
     UnityEngine.Canvas o = (UnityEngine.Canvas)obj;
     renderMode                = (uint)o.renderMode;
     worldCamera               = o.worldCamera.GetMappedInstanceID();
     scaleFactor               = o.scaleFactor;
     referencePixelsPerUnit    = o.referencePixelsPerUnit;
     overridePixelPerfect      = o.overridePixelPerfect;
     pixelPerfect              = o.pixelPerfect;
     planeDistance             = o.planeDistance;
     overrideSorting           = o.overrideSorting;
     sortingOrder              = o.sortingOrder;
     targetDisplay             = o.targetDisplay;
     normalizedSortingGridSize = o.normalizedSortingGridSize;
     sortingLayerID            = o.sortingLayerID;
     additionalShaderChannels  = (uint)o.additionalShaderChannels;
     sortingLayerName          = o.sortingLayerName;
 }
Exemplo n.º 17
0
        static int _m_PixelAdjustPoint_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    UnityEngine.Vector2   _point; translator.Get(L, 1, out _point);
                    UnityEngine.Transform _elementTransform = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
                    UnityEngine.Canvas    _canvas           = (UnityEngine.Canvas)translator.GetObject(L, 3, typeof(UnityEngine.Canvas));

                    var gen_ret = UnityEngine.RectTransformUtility.PixelAdjustPoint(_point, _elementTransform, _canvas);
                    translator.PushUnityEngineVector2(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 18
0
 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.Canvas o = (UnityEngine.Canvas)obj;
     o.renderMode                = (UnityEngine.RenderMode)renderMode;
     o.worldCamera               = (UnityEngine.Camera)objects.Get(worldCamera);
     o.scaleFactor               = scaleFactor;
     o.referencePixelsPerUnit    = referencePixelsPerUnit;
     o.overridePixelPerfect      = overridePixelPerfect;
     o.pixelPerfect              = pixelPerfect;
     o.planeDistance             = planeDistance;
     o.overrideSorting           = overrideSorting;
     o.sortingOrder              = sortingOrder;
     o.targetDisplay             = targetDisplay;
     o.normalizedSortingGridSize = normalizedSortingGridSize;
     o.sortingLayerID            = sortingLayerID;
     o.additionalShaderChannels  = (UnityEngine.AdditionalCanvasShaderChannels)additionalShaderChannels;
     o.sortingLayerName          = sortingLayerName;
     return(o);
 }
Exemplo n.º 19
0
 private static void SetUnsupportedFields(UnityEngine.Canvas canvas, UnityEngine.UI.CanvasScaler scaler)
 {
     canvas.renderMode             = UnityEngine.RenderMode.ScreenSpaceCamera;
     canvas.pixelPerfect           = false;
     scaler.referencePixelsPerUnit = 1;
 }
 public void Apply(UnityEngine.Canvas canvas)
 {
 }