diff --git a/Scripts/ImageExtended.cs b/Scripts/Effects/ImageExtended.cs
similarity index 100%
rename from Scripts/ImageExtended.cs
rename to Scripts/Effects/ImageExtended.cs
diff --git a/Scripts/ImageExtended.cs.meta b/Scripts/Effects/ImageExtended.cs.meta
similarity index 85%
rename from Scripts/ImageExtended.cs.meta
rename to Scripts/Effects/ImageExtended.cs.meta
index 8c5d9bf..fac983a 100644
--- a/Scripts/ImageExtended.cs.meta
+++ b/Scripts/Effects/ImageExtended.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 26d9c9fa4e5a13747a6ad9c3fedb57c8
+guid: 494907d85b5e56a49884a914adc358a5
timeCreated: 1440851346
licenseType: Pro
MonoImporter:
diff --git a/Scripts/RaycastMask.cs b/Scripts/Effects/RaycastMask.cs
similarity index 100%
rename from Scripts/RaycastMask.cs
rename to Scripts/Effects/RaycastMask.cs
diff --git a/Scripts/RaycastMask.cs.meta b/Scripts/Effects/RaycastMask.cs.meta
similarity index 100%
rename from Scripts/RaycastMask.cs.meta
rename to Scripts/Effects/RaycastMask.cs.meta
diff --git a/Scripts/Layout/UIVerticalScrollerDemo/Prefabs/DaysVertical.prefab b/Scripts/Layout/UIVerticalScrollerDemo/Prefabs/DaysVertical.prefab
index edb5788..231bac6 100644
Binary files a/Scripts/Layout/UIVerticalScrollerDemo/Prefabs/DaysVertical.prefab and b/Scripts/Layout/UIVerticalScrollerDemo/Prefabs/DaysVertical.prefab differ
diff --git a/Scripts/Layout/UIVerticalScrollerDemo/Prefabs/MonthsVertical.prefab b/Scripts/Layout/UIVerticalScrollerDemo/Prefabs/MonthsVertical.prefab
index 5185d1c..0642fdb 100644
Binary files a/Scripts/Layout/UIVerticalScrollerDemo/Prefabs/MonthsVertical.prefab and b/Scripts/Layout/UIVerticalScrollerDemo/Prefabs/MonthsVertical.prefab differ
diff --git a/Scripts/Layout/UIVerticalScrollerDemo/Prefabs/YearsVertical.prefab b/Scripts/Layout/UIVerticalScrollerDemo/Prefabs/YearsVertical.prefab
index 333688a..062148f 100644
Binary files a/Scripts/Layout/UIVerticalScrollerDemo/Prefabs/YearsVertical.prefab and b/Scripts/Layout/UIVerticalScrollerDemo/Prefabs/YearsVertical.prefab differ
diff --git a/Scripts/Layout/UIVerticalScrollerDemo/Scenes/VerticalCalendar.unity b/Scripts/Layout/UIVerticalScrollerDemo/Scenes/VerticalCalendar.unity
index 2cdfb4f..380b943 100644
Binary files a/Scripts/Layout/UIVerticalScrollerDemo/Scenes/VerticalCalendar.unity and b/Scripts/Layout/UIVerticalScrollerDemo/Scenes/VerticalCalendar.unity differ
diff --git a/Scripts/Primitives/UIPolygon.cs b/Scripts/Primitives/UIPolygon.cs
index 30156cb..d939924 100644
--- a/Scripts/Primitives/UIPolygon.cs
+++ b/Scripts/Primitives/UIPolygon.cs
@@ -82,10 +82,10 @@ namespace UnityEngine.UI.Extensions
}
return vbo;
}
- protected override void OnPopulateMesh(Mesh toFill)
+
+ protected override void OnPopulateMesh(VertexHelper vh)
{
- toFill.Clear();
- var vbo = new VertexHelper(toFill);
+ vh.Clear();
Vector2 prevX = Vector2.zero;
Vector2 prevY = Vector2.zero;
@@ -131,12 +131,7 @@ namespace UnityEngine.UI.Extensions
}
prevX = pos1;
prevY = pos2;
- vbo.AddUIVertexQuad(SetVbo(new[] { pos0, pos1, pos2, pos3 }, new[] { uv0, uv1, uv2, uv3 }));
- }
-
- if (vbo.currentVertCount > 3)
- {
- vbo.FillMesh(toFill);
+ vh.AddUIVertexQuad(SetVbo(new[] { pos0, pos1, pos2, pos3 }, new[] { uv0, uv1, uv2, uv3 }));
}
}
}
diff --git a/Scripts/ToolTips.meta b/Scripts/ToolTips.meta
new file mode 100644
index 0000000..669f459
--- /dev/null
+++ b/Scripts/ToolTips.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 3941688ec5107f5479d09d503b6376c5
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Scripts/BoundTooltip.meta b/Scripts/ToolTips/BoundTooltip.meta
similarity index 100%
rename from Scripts/BoundTooltip.meta
rename to Scripts/ToolTips/BoundTooltip.meta
diff --git a/Scripts/BoundTooltip/BoundTooltipItem.cs b/Scripts/ToolTips/BoundTooltip/BoundTooltipItem.cs
similarity index 100%
rename from Scripts/BoundTooltip/BoundTooltipItem.cs
rename to Scripts/ToolTips/BoundTooltip/BoundTooltipItem.cs
diff --git a/Scripts/BoundTooltip/BoundTooltipItem.cs.meta b/Scripts/ToolTips/BoundTooltip/BoundTooltipItem.cs.meta
similarity index 100%
rename from Scripts/BoundTooltip/BoundTooltipItem.cs.meta
rename to Scripts/ToolTips/BoundTooltip/BoundTooltipItem.cs.meta
diff --git a/Scripts/BoundTooltip/BoundTooltipTrigger.cs b/Scripts/ToolTips/BoundTooltip/BoundTooltipTrigger.cs
similarity index 100%
rename from Scripts/BoundTooltip/BoundTooltipTrigger.cs
rename to Scripts/ToolTips/BoundTooltip/BoundTooltipTrigger.cs
diff --git a/Scripts/BoundTooltip/BoundTooltipTrigger.cs.meta b/Scripts/ToolTips/BoundTooltip/BoundTooltipTrigger.cs.meta
similarity index 100%
rename from Scripts/BoundTooltip/BoundTooltipTrigger.cs.meta
rename to Scripts/ToolTips/BoundTooltip/BoundTooltipTrigger.cs.meta
diff --git a/Scripts/Utilities/HoverTooltip.cs b/Scripts/ToolTips/HoverTooltip.cs
similarity index 100%
rename from Scripts/Utilities/HoverTooltip.cs
rename to Scripts/ToolTips/HoverTooltip.cs
diff --git a/Scripts/Utilities/HoverTooltip.cs.meta b/Scripts/ToolTips/HoverTooltip.cs.meta
similarity index 100%
rename from Scripts/Utilities/HoverTooltip.cs.meta
rename to Scripts/ToolTips/HoverTooltip.cs.meta
diff --git a/Scripts/ToolTip.cs b/Scripts/ToolTips/ToolTip.cs
similarity index 100%
rename from Scripts/ToolTip.cs
rename to Scripts/ToolTips/ToolTip.cs
diff --git a/Scripts/ToolTip.cs.meta b/Scripts/ToolTips/ToolTip.cs.meta
similarity index 100%
rename from Scripts/ToolTip.cs.meta
rename to Scripts/ToolTips/ToolTip.cs.meta
diff --git a/Scripts/UISelectableExtension.cs b/Scripts/UISelectableExtension.cs
deleted file mode 100644
index 17733b8..0000000
--- a/Scripts/UISelectableExtension.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-/// Credit AriathTheWise
-/// Sourced from - http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/page-2#post-1796783
-/// Extended to include a HELD state that continually fires while the button is held down.
-/// Refactored so it can be added to any button and expose the events in the editor.
-/// Unselect fix by @Sfyne
-
-using UnityEngine.Events;
-using UnityEngine.EventSystems;
-
-namespace UnityEngine.UI.Extensions
-{
- ///
- /// UIButton
- ///
- [AddComponentMenu("UI/Extensions/UI Selectable Extension")]
- [RequireComponent(typeof(Selectable))]
- public class UISelectableExtension : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
- {
- #region Sub-Classes
- [System.Serializable]
- public class UIButtonEvent : UnityEvent { }
- #endregion
-
- #region Events
- [Tooltip("Event that fires when a button is initially pressed down")]
- public UIButtonEvent OnButtonPress;
- [Tooltip("Event that fires when a button is released")]
- public UIButtonEvent OnButtonRelease;
- [Tooltip("Event that continually fires while a button is held down")]
- public UIButtonEvent OnButtonHeld;
- #endregion
-
- private bool _pressed;
- private PointerEventData _heldEventData;
-
- void IPointerDownHandler.OnPointerDown(PointerEventData eventData)
- {
- //Can't set the state as it's too locked down.
- //DoStateTransition(SelectionState.Pressed, false);
-
- if (OnButtonPress != null)
- {
- OnButtonPress.Invoke(eventData.button);
- }
- _pressed = true;
- _heldEventData = eventData;
- }
-
-
- void IPointerUpHandler.OnPointerUp(PointerEventData eventData)
- {
- //DoStateTransition(SelectionState.Normal, false);
-
- if (OnButtonRelease != null)
- {
- OnButtonRelease.Invoke(eventData.button);
- }
- _pressed = false;
- _heldEventData = null;
- }
-
- void Update()
- {
- if (!_pressed)
- return;
-
- if (OnButtonHeld != null)
- {
- OnButtonHeld.Invoke(_heldEventData.button);
- }
- }
-
- ///
- /// Test method to verify a control has been clicked
- ///
- public void TestClicked()
- {
- #if DEBUG || UNITY_EDITOR
- Debug.Log("Control Clicked");
- #endif
- }
-
- ///
- /// Test method to verify a controll is pressed
- ///
- public void TestPressed()
- {
- #if DEBUG || UNITY_EDITOR
- Debug.Log("Control Pressed");
- #endif
- }
-
- ///
- /// est method to verify if a control is released
- ///
- public void TestReleased()
- {
- #if DEBUG || UNITY_EDITOR
- Debug.Log("Control Released");
- #endif
- }
-
- ///
- /// est method to verify if a control is being held
- ///
- public void TestHold()
- {
- #if DEBUG || UNITY_EDITOR
- Debug.Log("Control Held");
- #endif
- }
-
- //Fixed UISelectableExtension inactive bug (if gameObject becomes inactive while button is held down it never goes back to _pressed = false)
- void OnDisable ()
- {
- _pressed = false;
- }
- }
-}
\ No newline at end of file
diff --git a/Scripts/InputFieldEnterSubmit.cs b/Scripts/Utilities/InputFieldEnterSubmit.cs
similarity index 100%
rename from Scripts/InputFieldEnterSubmit.cs
rename to Scripts/Utilities/InputFieldEnterSubmit.cs
diff --git a/Scripts/InputFieldEnterSubmit.cs.meta b/Scripts/Utilities/InputFieldEnterSubmit.cs.meta
similarity index 100%
rename from Scripts/InputFieldEnterSubmit.cs.meta
rename to Scripts/Utilities/InputFieldEnterSubmit.cs.meta
diff --git a/Scripts/InputFocus.cs b/Scripts/Utilities/InputFocus.cs
similarity index 100%
rename from Scripts/InputFocus.cs
rename to Scripts/Utilities/InputFocus.cs
diff --git a/Scripts/InputFocus.cs.meta b/Scripts/Utilities/InputFocus.cs.meta
similarity index 100%
rename from Scripts/InputFocus.cs.meta
rename to Scripts/Utilities/InputFocus.cs.meta
diff --git a/Scripts/ReturnKeyTriggersButton.cs b/Scripts/Utilities/ReturnKeyTriggersButton.cs
similarity index 100%
rename from Scripts/ReturnKeyTriggersButton.cs
rename to Scripts/Utilities/ReturnKeyTriggersButton.cs
diff --git a/Scripts/ReturnKeyTriggersButton.cs.meta b/Scripts/Utilities/ReturnKeyTriggersButton.cs.meta
similarity index 100%
rename from Scripts/ReturnKeyTriggersButton.cs.meta
rename to Scripts/Utilities/ReturnKeyTriggersButton.cs.meta
diff --git a/Scripts/ScrollRectEx.cs b/Scripts/Utilities/ScrollRectEx.cs
similarity index 100%
rename from Scripts/ScrollRectEx.cs
rename to Scripts/Utilities/ScrollRectEx.cs
diff --git a/Scripts/ScrollRectEx.cs.meta b/Scripts/Utilities/ScrollRectEx.cs.meta
similarity index 100%
rename from Scripts/ScrollRectEx.cs.meta
rename to Scripts/Utilities/ScrollRectEx.cs.meta
diff --git a/Scripts/ScrollRectExtensions.cs b/Scripts/Utilities/ScrollRectExtensions.cs
similarity index 100%
rename from Scripts/ScrollRectExtensions.cs
rename to Scripts/Utilities/ScrollRectExtensions.cs
diff --git a/Scripts/ScrollRectExtensions.cs.meta b/Scripts/Utilities/ScrollRectExtensions.cs.meta
similarity index 100%
rename from Scripts/ScrollRectExtensions.cs.meta
rename to Scripts/Utilities/ScrollRectExtensions.cs.meta
diff --git a/Scripts/ScrollRectLinker.cs b/Scripts/Utilities/ScrollRectLinker.cs
similarity index 100%
rename from Scripts/ScrollRectLinker.cs
rename to Scripts/Utilities/ScrollRectLinker.cs
diff --git a/Scripts/ScrollRectLinker.cs.meta b/Scripts/Utilities/ScrollRectLinker.cs.meta
similarity index 100%
rename from Scripts/ScrollRectLinker.cs.meta
rename to Scripts/Utilities/ScrollRectLinker.cs.meta
diff --git a/Scripts/ScrollRectTweener.cs b/Scripts/Utilities/ScrollRectTweener.cs
similarity index 100%
rename from Scripts/ScrollRectTweener.cs
rename to Scripts/Utilities/ScrollRectTweener.cs
diff --git a/Scripts/ScrollRectTweener.cs.meta b/Scripts/Utilities/ScrollRectTweener.cs.meta
similarity index 100%
rename from Scripts/ScrollRectTweener.cs.meta
rename to Scripts/Utilities/ScrollRectTweener.cs.meta
diff --git a/Scripts/UIScrollToSelection.cs b/Scripts/Utilities/UIScrollToSelection.cs
similarity index 100%
rename from Scripts/UIScrollToSelection.cs
rename to Scripts/Utilities/UIScrollToSelection.cs
diff --git a/Scripts/UIScrollToSelection.cs.meta b/Scripts/Utilities/UIScrollToSelection.cs.meta
similarity index 100%
rename from Scripts/UIScrollToSelection.cs.meta
rename to Scripts/Utilities/UIScrollToSelection.cs.meta
diff --git a/Scripts/UIScrollToSelectionXY.cs b/Scripts/Utilities/UIScrollToSelectionXY.cs
similarity index 100%
rename from Scripts/UIScrollToSelectionXY.cs
rename to Scripts/Utilities/UIScrollToSelectionXY.cs
diff --git a/Scripts/UIScrollToSelectionXY.cs.meta b/Scripts/Utilities/UIScrollToSelectionXY.cs.meta
similarity index 100%
rename from Scripts/UIScrollToSelectionXY.cs.meta
rename to Scripts/Utilities/UIScrollToSelectionXY.cs.meta
diff --git a/Scripts/Utilities/UISelectableExtension.cs b/Scripts/Utilities/UISelectableExtension.cs
new file mode 100644
index 0000000..0f73cf1
--- /dev/null
+++ b/Scripts/Utilities/UISelectableExtension.cs
@@ -0,0 +1,112 @@
+/// Credit AriathTheWise
+/// Sourced from - http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/page-2#post-1796783
+/// Extended to include a HELD state that continually fires while the button is held down.
+/// Refactored so it can be added to any button and expose the events in the editor.
+
+using UnityEngine.Events;
+using UnityEngine.EventSystems;
+
+namespace UnityEngine.UI.Extensions
+{
+ ///
+ /// UIButton
+ ///
+ [AddComponentMenu("UI/Extensions/UI Selectable Extension")]
+ [RequireComponent(typeof(Selectable))]
+ public class UISelectableExtension : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
+ {
+ #region Sub-Classes
+ [System.Serializable]
+ public class UIButtonEvent : UnityEvent { }
+ #endregion
+
+ #region Events
+ [Tooltip("Event that fires when a button is initially pressed down")]
+ public UIButtonEvent OnButtonPress;
+ [Tooltip("Event that fires when a button is released")]
+ public UIButtonEvent OnButtonRelease;
+ [Tooltip("Event that continually fires while a button is held down")]
+ public UIButtonEvent OnButtonHeld;
+ #endregion
+
+ private bool _pressed;
+ private PointerEventData _heldEventData;
+
+ void IPointerDownHandler.OnPointerDown(PointerEventData eventData)
+ {
+ //Can't set the state as it's too locked down.
+ //DoStateTransition(SelectionState.Pressed, false);
+
+ if (OnButtonPress != null)
+ {
+ OnButtonPress.Invoke(eventData.button);
+ }
+ _pressed = true;
+ _heldEventData = eventData;
+ }
+
+
+ void IPointerUpHandler.OnPointerUp(PointerEventData eventData)
+ {
+ //DoStateTransition(SelectionState.Normal, false);
+
+ if (OnButtonRelease != null)
+ {
+ OnButtonRelease.Invoke(eventData.button);
+ }
+ _pressed = false;
+ _heldEventData = null;
+ }
+
+ void Update()
+ {
+ if (!_pressed)
+ return;
+
+ if (OnButtonHeld != null)
+ {
+ OnButtonHeld.Invoke(_heldEventData.button);
+ }
+ }
+
+ ///
+ /// Test method to verify a control has been clicked
+ ///
+ public void TestClicked()
+ {
+ #if DEBUG || UNITY_EDITOR
+ Debug.Log("Control Clicked");
+ #endif
+ }
+
+ ///
+ /// Test method to verify a controll is pressed
+ ///
+ public void TestPressed()
+ {
+ #if DEBUG || UNITY_EDITOR
+ Debug.Log("Control Pressed");
+ #endif
+ }
+
+ ///
+ /// est method to verify if a control is released
+ ///
+ public void TestReleased()
+ {
+ #if DEBUG || UNITY_EDITOR
+ Debug.Log("Control Released");
+ #endif
+ }
+
+ ///
+ /// est method to verify if a control is being held
+ ///
+ public void TestHold()
+ {
+ #if DEBUG || UNITY_EDITOR
+ Debug.Log("Control Held");
+ #endif
+ }
+ }
+}
\ No newline at end of file
diff --git a/Scripts/UISelectableExtension.cs.meta b/Scripts/Utilities/UISelectableExtension.cs.meta
similarity index 53%
rename from Scripts/UISelectableExtension.cs.meta
rename to Scripts/Utilities/UISelectableExtension.cs.meta
index 24ea92b..da3ac74 100644
--- a/Scripts/UISelectableExtension.cs.meta
+++ b/Scripts/Utilities/UISelectableExtension.cs.meta
@@ -1,12 +1,8 @@
fileFormatVersion: 2
-guid: 2bdfd6b4084989d41ba560bd1b72cbda
-timeCreated: 1441922219
-licenseType: Pro
+guid: 6bb501adc62c7394fae41ae7a6032eb3
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
- assetBundleName:
- assetBundleVariant: