| | 1 | | using System; |
| | 2 | | using UnityEngine; |
| | 3 | | using UnityEngine.Serialization; |
| | 4 | | using static UnityEngine.UI.GridLayoutGroup; |
| | 5 | |
|
| | 6 | | [Serializable] |
| | 7 | | public class GridContainerComponentModel : BaseComponentModel |
| | 8 | | { |
| 878 | 9 | | public Constraint constraint = Constraint.FixedColumnCount; |
| 878 | 10 | | public int constraintCount = 3; |
| | 11 | | [FormerlySerializedAs("adaptItemSizeToContainer")] public bool adaptHorizontallyItemSizeToContainer = false; |
| | 12 | | public bool adaptVerticallyItemSizeToContainer = false; |
| | 13 | | public Vector2 itemSize; |
| | 14 | | public Vector2 spaceBetweenItems; |
| | 15 | |
|
| | 16 | | [Header("Flexible configuration")] |
| | 17 | | //The min width and height for the item |
| | 18 | | public float minWidthForFlexibleItems; |
| | 19 | | public float minHeightForFlexibleItems; |
| | 20 | |
|
| | 21 | | //It will take the recommended values if it can |
| | 22 | | public float recommendedWidthForFlexibleItems; |
| | 23 | | public float recommendedHeightForFlexibleItems; |
| | 24 | |
|
| | 25 | | //If this property is set to true, if the the recommended height or width can be achieved, it will maintain the same |
| | 26 | | public bool sameHeightAndWidhtFlexibleItem = false; |
| | 27 | | } |