From d07e14add74e017b52ab2371efeea1aa4ea10ced Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 8 May 2021 23:15:13 +0800 Subject: +init --- .../UI/Core/Layout/VerticalLayoutGroup.cs | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Layout/VerticalLayoutGroup.cs (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Layout/VerticalLayoutGroup.cs') 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); + } + } +} -- cgit v1.1-26-g67d0