From 3b5bdaaa5ae6b14f81c0d6232228092ff883f89d Mon Sep 17 00:00:00 2001 From: "Simon (darkside) Jackson" Date: Tue, 17 May 2016 13:26:50 +0100 Subject: [PATCH] Initial check-in for the 1.1 release, fixes include: * Update to Line Renderer - updated scrip plus patches, now more code friendly for adding points * New Curved Layout component * ScrolTo script updated based on authors new version * UISoftAlphaMask updated to latest version * Added ScrollSpeed to Horizontal and Vertical Scroll Snap * Added Scroll Conflict Manager (untested) ToDo: * Test Scroll Conflict manager * Make the distance between pages on the H&V Scroll snaps configurable * Test Scroll Snap starting page fix * Review Reorderable List scrolling issue * Review Reorderable List Worldspace render issue --HG-- branch : develop_5.3 --- Scripts/Effects/SoftMaskScript.cs | 71 ++++- Scripts/Layout/CurvedLayout.cs.meta | 12 + Scripts/Layout/HorizontalScrollSnap.cs | 37 ++- Scripts/Layout/RadialLayout.cs | 2 +- Scripts/Layout/VerticalScrollSnap.cs | 7 +- Scripts/Primitives/UICircle.cs | 112 ++++--- Scripts/Primitives/UILineRenderer.cs | 254 ++++++++++++---- Scripts/Primitives/UILineTextureRenderer.cs | 49 ++- .../ScrollConflictManager.meta | 8 + Scripts/Utilities/UIScrollToSelection.cs | 287 +++++++++++++----- Shaders/SoftMaskShader.shader | 12 - Shaders/SoftMaskShaderText.shader | 36 +-- package.json | 2 +- 13 files changed, 634 insertions(+), 255 deletions(-) create mode 100644 Scripts/Layout/CurvedLayout.cs.meta create mode 100644 Scripts/ReorderableList/ScrollConflictManager.meta diff --git a/Scripts/Effects/SoftMaskScript.cs b/Scripts/Effects/SoftMaskScript.cs index e8cb169..080462b 100644 --- a/Scripts/Effects/SoftMaskScript.cs +++ b/Scripts/Effects/SoftMaskScript.cs @@ -30,9 +30,11 @@ namespace UnityEngine.UI.Extensions [Tooltip("Flip the masks alpha value")] public bool FlipAlphaMask = false; - [Tooltip("If Mask Scals Rect is given, and this value is true, the area around the mask will not be clipped")] + [Tooltip("If Mask Scaling Rect is given and this value is true, the area around the mask will not be clipped")] public bool DontClipMaskScalingRect = false; + [Tooltip("If set to true, this mask is applied to all child Text and Graphic objects belonging to this object.")] + public bool CascadeToALLChildren; Vector3[] worldCorners; Vector2 AlphaUV; @@ -41,7 +43,10 @@ namespace UnityEngine.UI.Extensions Vector2 max = Vector2.one; Vector2 p; Vector2 siz; + Vector2 tp = new Vector2(.5f, .5f); + + bool MaterialNotSupported; // UI items like toggles, we can stil lcascade down to them though :) Rect maskRect; Rect contentRect; @@ -75,11 +80,39 @@ namespace UnityEngine.UI.Extensions // For some reason, having the mask control on the parent and disabled stops the mouse interacting // with the texture layer that is not visible.. Not needed for the Image. - if (transform.parent.GetComponent() == null) + if (transform.parent.GetComponent