From 4bd100c7e9aa2096d726bb707df142fc26a93494 Mon Sep 17 00:00:00 2001 From: Simon Jackson Date: Sun, 18 Dec 2016 22:51:16 +0000 Subject: [PATCH] Initial check-in of visible ony VSS (HSS yet to be updated) --HG-- branch : develop_5.3 --- Scripts/Layout/HorizontalScrollSnap.cs | 38 +----- Scripts/Layout/ScrollSnapBase.cs | 173 ++++++++++++++++++------- Scripts/Layout/VerticalScrollSnap.cs | 48 ++----- 3 files changed, 137 insertions(+), 122 deletions(-) diff --git a/Scripts/Layout/HorizontalScrollSnap.cs b/Scripts/Layout/HorizontalScrollSnap.cs index 77a424c..8abbf39 100644 --- a/Scripts/Layout/HorizontalScrollSnap.cs +++ b/Scripts/Layout/HorizontalScrollSnap.cs @@ -13,39 +13,14 @@ namespace UnityEngine.UI.Extensions [AddComponentMenu("Layout/Extensions/Horizontal Scroll Snap")] public class HorizontalScrollSnap : ScrollSnapBase, IEndDragHandler { - - // Use this for initialization - void Awake() - { - _scroll_rect = gameObject.GetComponent(); - - if (_scroll_rect.horizontalScrollbar || _scroll_rect.verticalScrollbar) - { - Debug.LogWarning("Warning, using scrollbars with the Scroll Snap controls is not advised as it causes unpredictable results"); - } - - //Should this derrive from ScrolRect? - isVertical = false; - - _screensContainer = _scroll_rect.content; - - DistributePages(); - - if (NextButton) - NextButton.GetComponent