private void OnEnable() { this._originalPosition = this._target.transform.position; this._target.transform.position = base.transform.position; this._anchorUpdate = this._target.updateAnchors; this._target.updateAnchors = UIRect.AnchorUpdate.OnStart; this._target.GetComponentInParent <UIPanel>().Refresh(); }
static int IntToEnum(IntPtr L) { int arg0 = (int)LuaDLL.lua_tonumber(L, 1); UIRect.AnchorUpdate o = (UIRect.AnchorUpdate)arg0; ToLua.Push(L, o); return(1); }
public UIRectMessage(UIRect uiRect) : base(uiRect) { Alpha = uiRect.alpha; UpdateAnchors = uiRect.updateAnchors; LeftAnchor = uiRect.LeftAnchorPosition; RightAnchor = uiRect.RightAnchorPosition; BottomAnchor = uiRect.BottomAnchorPosition; TopAnchor = uiRect.TopAnchorPosition; }
public override void Deserialize(BinaryReader br) { base.Deserialize(br); Alpha = br.ReadSingle(); UpdateAnchors = (UIRect.AnchorUpdate)br.ReadInt32(); LeftAnchor = UIRect.Position.Read(br); RightAnchor = UIRect.Position.Read(br); BottomAnchor = UIRect.Position.Read(br); TopAnchor = UIRect.Position.Read(br); }
public unsafe override void Unity_NamedDeserialize(int depth) { byte[] var_0_cp_0; int var_0_cp_1; if (depth <= 7) { if (this.leftAnchor == null) { this.leftAnchor = new UIRect.AnchorPoint(); } UIRect.AnchorPoint arg_3F_0 = this.leftAnchor; ISerializedNamedStateReader arg_37_0 = SerializedNamedStateReader.Instance; var_0_cp_0 = $FieldNamesStorage.$RuntimeNames; var_0_cp_1 = 0; arg_37_0.BeginMetaGroup(&var_0_cp_0[var_0_cp_1] + 2296); arg_3F_0.Unity_NamedDeserialize(depth + 1); SerializedNamedStateReader.Instance.EndMetaGroup(); } if (depth <= 7) { if (this.rightAnchor == null) { this.rightAnchor = new UIRect.AnchorPoint(); } UIRect.AnchorPoint arg_82_0 = this.rightAnchor; SerializedNamedStateReader.Instance.BeginMetaGroup(&var_0_cp_0[var_0_cp_1] + 2307); arg_82_0.Unity_NamedDeserialize(depth + 1); SerializedNamedStateReader.Instance.EndMetaGroup(); } if (depth <= 7) { if (this.bottomAnchor == null) { this.bottomAnchor = new UIRect.AnchorPoint(); } UIRect.AnchorPoint arg_C5_0 = this.bottomAnchor; SerializedNamedStateReader.Instance.BeginMetaGroup(&var_0_cp_0[var_0_cp_1] + 2319); arg_C5_0.Unity_NamedDeserialize(depth + 1); SerializedNamedStateReader.Instance.EndMetaGroup(); } if (depth <= 7) { if (this.topAnchor == null) { this.topAnchor = new UIRect.AnchorPoint(); } UIRect.AnchorPoint arg_108_0 = this.topAnchor; SerializedNamedStateReader.Instance.BeginMetaGroup(&var_0_cp_0[var_0_cp_1] + 2332); arg_108_0.Unity_NamedDeserialize(depth + 1); SerializedNamedStateReader.Instance.EndMetaGroup(); } this.updateAnchors = (UIRect.AnchorUpdate)SerializedNamedStateReader.Instance.ReadInt32(&var_0_cp_0[var_0_cp_1] + 741); }
public UIRect() { this.leftAnchor = new UIRect.AnchorPoint(); this.rightAnchor = new UIRect.AnchorPoint(1f); this.bottomAnchor = new UIRect.AnchorPoint(); this.topAnchor = new UIRect.AnchorPoint(1f); this.updateAnchors = UIRect.AnchorUpdate.OnUpdate; this.mChildren = new BetterList <UIRect>(); this.mChanged = true; this.mUpdateAnchors = true; this.mUpdateFrame = -1; this.finalAlpha = 1f; base..ctor(); }
static int set_updateAnchors(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UIRect obj = (UIRect)o; UIRect.AnchorUpdate arg0 = (UIRect.AnchorUpdate)ToLua.CheckObject(L, 2, typeof(UIRect.AnchorUpdate)); obj.updateAnchors = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index updateAnchors on a nil value")); } }
static int get_updateAnchors(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UIRect obj = (UIRect)o; UIRect.AnchorUpdate ret = obj.updateAnchors; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index updateAnchors on a nil value")); } }
private static int set_updateAnchors(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); UIRect uIRect = (UIRect)obj; UIRect.AnchorUpdate updateAnchors = (UIRect.AnchorUpdate)((int)ToLua.CheckObject(L, 2, typeof(UIRect.AnchorUpdate))); uIRect.updateAnchors = updateAnchors; result = 0; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index updateAnchors on a nil value"); } return(result); }
private static int get_updateAnchors(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); UIRect uIRect = (UIRect)obj; UIRect.AnchorUpdate updateAnchors = uIRect.updateAnchors; ToLua.Push(L, updateAnchors); result = 1; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index updateAnchors on a nil value"); } return(result); }
public override void Unity_Deserialize(int depth) { if (depth <= 7) { if (this.leftAnchor == null) { this.leftAnchor = new UIRect.AnchorPoint(); } this.leftAnchor.Unity_Deserialize(depth + 1); } if (depth <= 7) { if (this.rightAnchor == null) { this.rightAnchor = new UIRect.AnchorPoint(); } this.rightAnchor.Unity_Deserialize(depth + 1); } if (depth <= 7) { if (this.bottomAnchor == null) { this.bottomAnchor = new UIRect.AnchorPoint(); } this.bottomAnchor.Unity_Deserialize(depth + 1); } if (depth <= 7) { if (this.topAnchor == null) { this.topAnchor = new UIRect.AnchorPoint(); } this.topAnchor.Unity_Deserialize(depth + 1); } this.updateAnchors = (UIRect.AnchorUpdate)SerializedStateReader.Instance.ReadInt32(); }