diff options
author | chai <chaifix@163.com> | 2021-05-08 23:15:13 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-05-08 23:15:13 +0800 |
commit | d07e14add74e017b52ab2371efeea1aa4ea10ced (patch) | |
tree | efd07869326e4c428f5bfe43fad0c2583d32a401 /Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Layout/VerticalLayoutGroup.cs |
+init
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Layout/VerticalLayoutGroup.cs')
-rw-r--r-- | Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Layout/VerticalLayoutGroup.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Layout/VerticalLayoutGroup.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Layout/VerticalLayoutGroup.cs new file mode 100644 index 0000000..e24b842 --- /dev/null +++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Layout/VerticalLayoutGroup.cs @@ -0,0 +1,30 @@ +namespace UnityEngine.UI +{ + [AddComponentMenu("Layout/Vertical Layout Group", 151)] + public class VerticalLayoutGroup : HorizontalOrVerticalLayoutGroup + { + protected VerticalLayoutGroup() + {} + + public override void CalculateLayoutInputHorizontal() + { + base.CalculateLayoutInputHorizontal(); + CalcAlongAxis(0, true); + } + + public override void CalculateLayoutInputVertical() + { + CalcAlongAxis(1, true); + } + + public override void SetLayoutHorizontal() + { + SetChildrenAlongAxis(0, true); + } + + public override void SetLayoutVertical() + { + SetChildrenAlongAxis(1, true); + } + } +} |