public void PerformClipping() { Rect canvasRect = this.GetCanvasRect(); UnityEngine.RectTransform.Axis axis = this.axis; if (axis == UnityEngine.RectTransform.Axis.Horizontal) { float width = canvasRect.width; canvasRect.xMin = Mathf.Max(canvasRect.xMin, canvasRect.xMin + (this.FromX * width)); canvasRect.xMax = Mathf.Min(canvasRect.xMax, canvasRect.xMax - ((1f - this.ToX) * width)); } else if (axis == UnityEngine.RectTransform.Axis.Vertical) { float height = canvasRect.height; canvasRect.yMin = Mathf.Max(canvasRect.yMin, canvasRect.yMin + (this.FromX * height)); canvasRect.yMax = Mathf.Min(canvasRect.yMax, canvasRect.yMax - ((1f - this.ToX) * height)); } CanvasRenderer component = base.GetComponent <CanvasRenderer>(); if (component != null) { component.EnableRectClipping(canvasRect); } this.maskableCache.Clear(); base.GetComponentsInChildren <MaskableGraphic>(this.maskableCache); foreach (MaskableGraphic graphic in this.maskableCache) { graphic.SetClipRect(canvasRect, true); } }
static int IntToEnum(IntPtr L) { int arg0 = (int)LuaDLL.lua_tointeger(L, 1); UnityEngine.RectTransform.Axis o = (UnityEngine.RectTransform.Axis)arg0; ToLua.Push(L, o); return(1); }
static int SetSizeWithCurrentAnchors(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 3); RectTransform obj = LuaScriptMgr.GetUnityObject <RectTransform>(L, 1); UnityEngine.RectTransform.Axis arg0 = LuaScriptMgr.GetNetObject <UnityEngine.RectTransform.Axis>(L, 2); float arg1 = (float)LuaScriptMgr.GetNumber(L, 3); obj.SetSizeWithCurrentAnchors(arg0, arg1); return(0); }
static int QPYX_SetSizeWithCurrentAnchors_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 3); UnityEngine.RectTransform QPYX_obj_YXQP = (UnityEngine.RectTransform)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.RectTransform)); UnityEngine.RectTransform.Axis QPYX_arg0_YXQP = (UnityEngine.RectTransform.Axis)ToLua.CheckObject(L_YXQP, 2, typeof(UnityEngine.RectTransform.Axis)); float QPYX_arg1_YXQP = (float)LuaDLL.luaL_checknumber(L_YXQP, 3); QPYX_obj_YXQP.SetSizeWithCurrentAnchors(QPYX_arg0_YXQP, QPYX_arg1_YXQP); return(0); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static int SetSizeWithCurrentAnchors(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); UnityEngine.RectTransform obj = (UnityEngine.RectTransform)ToLua.CheckObject(L, 1, typeof(UnityEngine.RectTransform)); UnityEngine.RectTransform.Axis arg0 = (UnityEngine.RectTransform.Axis)ToLua.CheckObject(L, 2, typeof(UnityEngine.RectTransform.Axis)); float arg1 = (float)LuaDLL.luaL_checknumber(L, 3); obj.SetSizeWithCurrentAnchors(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static StackObject *SetSizeWithCurrentAnchors_20(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, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Single size = *(float *)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.RectTransform.Axis axis = (UnityEngine.RectTransform.Axis) typeof(UnityEngine.RectTransform.Axis).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); UnityEngine.RectTransform instance_of_this_method; instance_of_this_method = (UnityEngine.RectTransform) typeof(UnityEngine.RectTransform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.SetSizeWithCurrentAnchors(axis, size); return(__ret); }
static void Push(IntPtr L, UnityEngine.RectTransform.Axis arg) { ToLua.Push(L, arg); }