private void DoStartCorner() { GameObject _go = Fsm.GetOwnerDefaultTarget(gameObject); if (_go == null) { return; } if (_go != null) { _Grid = _go.GetComponent <UnityEngine.UI.GridLayoutGroup>(); switch (childAlignment) { case ChildAlignment.UpperLeft: _Grid.childAlignment = TextAnchor.UpperLeft; break; case ChildAlignment.UpperRight: _Grid.childAlignment = TextAnchor.UpperRight; break; case ChildAlignment.LowerLeft: _Grid.childAlignment = TextAnchor.LowerLeft; break; case ChildAlignment.LowerRight: _Grid.childAlignment = TextAnchor.LowerRight; break; } } }
private void DoSetCellSize() { GameObject _go = Fsm.GetOwnerDefaultTarget(gameObject); if (_go == null) { return; } if (_go != null) { _Grid = _go.GetComponent <UnityEngine.UI.GridLayoutGroup>(); } if (!cellSize.IsNone) { newCellSize = cellSize.Value; } if (!cellSizeX.IsNone) { newCellSize.x = cellSizeX.Value; } if (!cellSizeY.IsNone) { newCellSize.y = cellSizeY.Value; } _Grid.cellSize = newCellSize; }
void Start() { UnityEngine.UI.GridLayoutGroup gridLayoutGroup = GetComponent <UnityEngine.UI.GridLayoutGroup>(); int width = (int)(((RectTransform)gridLayoutGroup.transform).rect.width - ((gridLayoutGroup.constraintCount + 1) * gridLayoutGroup.spacing.x)) / gridLayoutGroup.constraintCount; gridLayoutGroup.cellSize = new Vector2(width, gridLayoutGroup.cellSize.y); }
private void DoSetPadding() { GameObject _go = Fsm.GetOwnerDefaultTarget(gameObject); if (_go == null) { return; } if (_go != null) { _Grid = _go.GetComponent <UnityEngine.UI.GridLayoutGroup>(); } if (!left.IsNone) { _Grid.padding.left = left.Value; } if (!right.IsNone) { _Grid.padding.right = right.Value; } if (!top.IsNone) { _Grid.padding.top = top.Value; } if (!bottom.IsNone) { _Grid.padding.bottom = bottom.Value; } }
private void DoSetSpacing() { GameObject _go = Fsm.GetOwnerDefaultTarget(gameObject); if (_go == null) { return; } if (_go != null) { _Grid = _go.GetComponent <UnityEngine.UI.GridLayoutGroup>(); } if (!spacing.IsNone) { newSpacing = spacing.Value; } if (!spacingX.IsNone) { newSpacing.x = spacingX.Value; } if (!spacingY.IsNone) { newSpacing.y = spacingY.Value; } _Grid.spacing = newSpacing; }
int UnityEngineUIGridLayoutGroup_g_get_constraintCount(RealStatePtr L, int gen_param_count) { ObjectTranslator translator = this; UnityEngine.UI.GridLayoutGroup gen_to_be_invoked = (UnityEngine.UI.GridLayoutGroup)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.constraintCount); return(1); }
int UnityEngineUIGridLayoutGroup_g_get_spacing(RealStatePtr L, int gen_param_count) { ObjectTranslator translator = this; UnityEngine.UI.GridLayoutGroup gen_to_be_invoked = (UnityEngine.UI.GridLayoutGroup)translator.FastGetCSObj(L, 1); translator.PushUnityEngineVector2(L, gen_to_be_invoked.spacing); return(1); }
int UnityEngineUIGridLayoutGroup_s_set_constraint(RealStatePtr L, int gen_param_count) { ObjectTranslator translator = this; UnityEngine.UI.GridLayoutGroup gen_to_be_invoked = (UnityEngine.UI.GridLayoutGroup)translator.FastGetCSObj(L, 1); UnityEngine.UI.GridLayoutGroup.Constraint gen_value; translator.Get(L, 2, out gen_value); gen_to_be_invoked.constraint = gen_value; return(0); }
static int _g_get_constraint(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.UI.GridLayoutGroup gen_to_be_invoked = (UnityEngine.UI.GridLayoutGroup)translator.FastGetCSObj(L, 1); translator.PushUnityEngineUIGridLayoutGroupConstraint(L, gen_to_be_invoked.constraint); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(1); }
static int _g_get_constraintCount(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { UnityEngine.UI.GridLayoutGroup __cl_gen_to_be_invoked = (UnityEngine.UI.GridLayoutGroup)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, __cl_gen_to_be_invoked.constraintCount); } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(1); }
static int _g_get_spacing(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { UnityEngine.UI.GridLayoutGroup __cl_gen_to_be_invoked = (UnityEngine.UI.GridLayoutGroup)translator.FastGetCSObj(L, 1); translator.PushUnityEngineVector2(L, __cl_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_constraintCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.UI.GridLayoutGroup gen_to_be_invoked = (UnityEngine.UI.GridLayoutGroup)translator.FastGetCSObj(L, 1); gen_to_be_invoked.constraintCount = LuaAPI.xlua_tointeger(L, 2); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(0); }
protected override void OnInit() { base.OnInit(); m_output_scroll = Make <GameUIComponent>("Scroll View (1)"); m_output_grid = m_output_scroll.Make <GameUIContainer>("Viewport"); m_drop_scroll = Make <GameScrollView>("Scroll View"); m_drop_grid = m_drop_scroll.Make <GameUIContainer>("Viewport"); m_drop_grid_ori_local_x = m_drop_grid.gameObject.transform.localPosition.x; m_drop_layout = m_drop_grid.GetComponent <UnityEngine.UI.GridLayoutGroup>(); m_drop_item_size_x = m_drop_layout.cellSize.x; m_drop_item_space_x = m_drop_layout.spacing.x; }
static int _s_set_spacing(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.UI.GridLayoutGroup gen_to_be_invoked = (UnityEngine.UI.GridLayoutGroup)translator.FastGetCSObj(L, 1); UnityEngine.Vector2 gen_value; translator.Get(L, 2, out gen_value); gen_to_be_invoked.spacing = gen_value; } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(0); }
static int _s_set_constraint(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { UnityEngine.UI.GridLayoutGroup __cl_gen_to_be_invoked = (UnityEngine.UI.GridLayoutGroup)translator.FastGetCSObj(L, 1); UnityEngine.UI.GridLayoutGroup.Constraint __cl_gen_value; translator.Get(L, 2, out __cl_gen_value); __cl_gen_to_be_invoked.constraint = __cl_gen_value; } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(0); }
static StackObject *get_startCorner_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.GridLayoutGroup instance_of_this_method = (UnityEngine.UI.GridLayoutGroup) typeof(UnityEngine.UI.GridLayoutGroup).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.startCorner; return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }
static StackObject *SetLayoutVertical_15(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.GridLayoutGroup instance_of_this_method = (UnityEngine.UI.GridLayoutGroup) typeof(UnityEngine.UI.GridLayoutGroup).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.SetLayoutVertical(); return(__ret); }
public override void ReadFrom(object obj) { base.ReadFrom(obj); if (obj == null) { return; } UnityEngine.UI.GridLayoutGroup o = (UnityEngine.UI.GridLayoutGroup)obj; startCorner = (uint)o.startCorner; startAxis = (uint)o.startAxis; cellSize = o.cellSize; spacing = o.spacing; constraint = (uint)o.constraint; constraintCount = o.constraintCount; }
int UnityEngineUIGridLayoutGroup_m_CalculateLayoutInputVertical(RealStatePtr L, int gen_param_count) { ObjectTranslator translator = this; UnityEngine.UI.GridLayoutGroup gen_to_be_invoked = (UnityEngine.UI.GridLayoutGroup)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.CalculateLayoutInputVertical( ); return(0); } }
int UnityEngineUIGridLayoutGroup_m_SetLayoutHorizontal(RealStatePtr L, int gen_param_count) { ObjectTranslator translator = this; UnityEngine.UI.GridLayoutGroup gen_to_be_invoked = (UnityEngine.UI.GridLayoutGroup)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.SetLayoutHorizontal( ); return(0); } }
static StackObject *get_constraintCount_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, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.UI.GridLayoutGroup instance_of_this_method = (UnityEngine.UI.GridLayoutGroup) typeof(UnityEngine.UI.GridLayoutGroup).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.constraintCount; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method; return(__ret + 1); }
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.GridLayoutGroup o = (UnityEngine.UI.GridLayoutGroup)obj; o.startCorner = (UnityEngine.UI.GridLayoutGroup.Corner)startCorner; o.startAxis = (UnityEngine.UI.GridLayoutGroup.Axis)startAxis; o.cellSize = cellSize; o.spacing = spacing; o.constraint = (UnityEngine.UI.GridLayoutGroup.Constraint)constraint; o.constraintCount = constraintCount; return(o); }
/// <summary> /// Write the specified value using the writer. /// </summary> /// <param name="value">Value.</param> /// <param name="writer">Writer.</param> public override void Write(object value, ISaveGameWriter writer) { UnityEngine.UI.GridLayoutGroup gridLayoutGroup = (UnityEngine.UI.GridLayoutGroup)value; writer.WriteProperty("startCorner", gridLayoutGroup.startCorner); writer.WriteProperty("startAxis", gridLayoutGroup.startAxis); writer.WriteProperty("cellSize", gridLayoutGroup.cellSize); writer.WriteProperty("spacing", gridLayoutGroup.spacing); writer.WriteProperty("constraint", gridLayoutGroup.constraint); writer.WriteProperty("constraintCount", gridLayoutGroup.constraintCount); writer.WriteProperty("padding", gridLayoutGroup.padding); writer.WriteProperty("childAlignment", gridLayoutGroup.childAlignment); writer.WriteProperty("useGUILayout", gridLayoutGroup.useGUILayout); writer.WriteProperty("enabled", gridLayoutGroup.enabled); writer.WriteProperty("tag", gridLayoutGroup.tag); writer.WriteProperty("name", gridLayoutGroup.name); writer.WriteProperty("hideFlags", gridLayoutGroup.hideFlags); }
static StackObject *set_constraintCount_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); System.Int32 @value = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.UI.GridLayoutGroup instance_of_this_method = (UnityEngine.UI.GridLayoutGroup) typeof(UnityEngine.UI.GridLayoutGroup).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.constraintCount = value; return(__ret); }
static StackObject *set_spacing_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.Vector2 @value = (UnityEngine.Vector2) typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.UI.GridLayoutGroup instance_of_this_method = (UnityEngine.UI.GridLayoutGroup) typeof(UnityEngine.UI.GridLayoutGroup).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.spacing = value; return(__ret); }
static int _m_CalculateLayoutInputVertical(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.UI.GridLayoutGroup __cl_gen_to_be_invoked = (UnityEngine.UI.GridLayoutGroup)translator.FastGetCSObj(L, 1); try { { __cl_gen_to_be_invoked.CalculateLayoutInputVertical( ); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_SetLayoutHorizontal(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.UI.GridLayoutGroup gen_to_be_invoked = (UnityEngine.UI.GridLayoutGroup)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.SetLayoutHorizontal( ); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
void Awake() { rt = (RectTransform)transform; if (GetComponent<UnityEngine.UI.GridLayoutGroup>()) { g = GetComponent<UnityEngine.UI.GridLayoutGroup>(); g.cellSize = new Vector2(rt.rect.width, g.cellSize.y); spacing = g.spacing; cellSize = g.cellSize; } if (GetComponent<CustomGrid>()) { c = GetComponent<CustomGrid>(); if (!onlySetContainerHeight) c.ObjSize = new Vector2(rt.rect.width, c.ObjSize.y); cellSize = c.ObjSize; spacing = c.maxSpacing; } }
static StackObject *get_spacing_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, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.UI.GridLayoutGroup instance_of_this_method = (UnityEngine.UI.GridLayoutGroup) typeof(UnityEngine.UI.GridLayoutGroup).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; if (ILRuntime.Runtime.Generated.CLRBindings.s_UnityEngine_Vector2_Binding_Binder != null) { ILRuntime.Runtime.Generated.CLRBindings.s_UnityEngine_Vector2_Binding_Binder.PushValue(ref result_of_this_method, __intp, __ret, __mStack); return(__ret + 1); } else { return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); } }
protected override void OnInit() { base.OnInit(); m_3D_view = Make <Combine3DView>("Panel:3D"); m_tex_view = Make <GameTexture>("Panel:RawImage_Tex"); m_icon_view = Make <GameImage>("Panel:Image_Icon"); m_left_toggles[0] = Make <ToggleWithArrowTween>("leftBtn:btnTotal"); m_left_toggles[0].Refresh((int)ENUM_COMBINE_TYPE.POLICE, ENUM_COMBINE_TYPE.POLICE.ToString(), false, LeftToggleChecked); m_left_toggles[1] = Make <ToggleWithArrowTween>("leftBtn:btnRecently"); m_left_toggles[1].Refresh((int)ENUM_COMBINE_TYPE.COLLECTION, ENUM_COMBINE_TYPE.COLLECTION.ToString(), false, LeftToggleChecked); m_left_toggles[2] = Make <ToggleWithArrowTween>("leftBtn:btnEnergy"); m_left_toggles[2].Refresh((int)ENUM_COMBINE_TYPE.OTHER, ENUM_COMBINE_TYPE.OTHER.ToString(), false, LeftToggleChecked); m_top_toggle_grid = Make <GameLoopUIContainer <ToggleCheckMarkView> >("Panel:ScrollView:Viewport"); m_drop_grid_ori_local_x = m_top_toggle_grid.gameObject.transform.localPosition.x; m_drop_layout = m_top_toggle_grid.GetComponent <UnityEngine.UI.GridLayoutGroup>(); m_drop_item_size_x = m_drop_layout.cellSize.x; m_drop_item_space_x = m_drop_layout.spacing.x; m_big_stuffs[0] = Make <BigStuffItemView>("Panel:Panel:Big0"); m_big_stuffs[1] = Make <BigStuffItemView>("Panel:Panel:Big1"); m_big_stuffs[2] = Make <BigStuffItemView>("Panel:Panel:Big2"); m_big_stuffs[3] = Make <BigStuffItemView>("Panel:Panel:Big3"); m_big_stuffs[4] = Make <BigStuffItemView>("Panel:Panel:Big4"); m_big_stuffs[5] = Make <BigStuffItemView>("Panel:Panel:Big5"); m_small_stuffs[0] = Make <SmallStuffItemView>("Panel:Panel:Image (6)"); m_small_stuffs[1] = Make <SmallStuffItemView>("Panel:Panel:Image (7)"); m_small_stuffs[2] = Make <SmallStuffItemView>("Panel:Panel:Image (8)"); m_small_stuffs[3] = Make <SmallStuffItemView>("Panel:Panel:Image (9)"); m_gift_btn = Make <GameButton>("Panel:Image:Button"); m_combine_btn = Make <GameButton>("Panel:Panel:Button"); m_stored_img = Make <GameImage>("Panel:Panel:Image_colected"); m_name_txt = Make <GameLabel>("Panel:Text"); m_No_txt = Make <GameLabel>("Panel:Text (1)"); m_progress_txt = Make <GameLabel>("Panel:Text (2)"); }
void Awake() { rt = (RectTransform)transform; if (GetComponent <UnityEngine.UI.GridLayoutGroup>()) { g = GetComponent <UnityEngine.UI.GridLayoutGroup>(); g.cellSize = new Vector2(rt.rect.width, g.cellSize.y); spacing = g.spacing; cellSize = g.cellSize; } if (GetComponent <CustomGrid>()) { c = GetComponent <CustomGrid>(); if (!onlySetContainerHeight) { c.ObjSize = new Vector2(rt.rect.width, c.ObjSize.y); } cellSize = c.ObjSize; spacing = c.maxSpacing; } }