1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-21 01:36:05 +08:00

Added ScrollRect.DOHorizontal/VerticalNormalizedPos + DONormalizedPos shortcuts

This commit is contained in:
Demigiant 2016-02-10 13:05:55 +01:00
parent 51ad72269d
commit 72f42baa67
46 changed files with 109 additions and 1 deletions

View File

@ -174,6 +174,24 @@
<param name="duration">The duration of the tween</param> <param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param> <param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions46.DONormalizedPos(UnityEngine.UI.ScrollRect,UnityEngine.Vector2,System.Single,System.Boolean)">
<summary>Tweens a ScrollRect's horizontal/verticalNormalizedPosition to the given value.
Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOHorizontalNormalizedPos(UnityEngine.UI.ScrollRect,System.Single,System.Single,System.Boolean)">
<summary>Tweens a ScrollRect's horizontalNormalizedPosition to the given value.
Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOVerticalNormalizedPos(UnityEngine.UI.ScrollRect,System.Single,System.Single,System.Boolean)">
<summary>Tweens a ScrollRect's verticalNormalizedPosition to the given value.
Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOValue(UnityEngine.UI.Slider,System.Single,System.Single,System.Boolean)"> <member name="M:DG.Tweening.ShortcutExtensions46.DOValue(UnityEngine.UI.Slider,System.Single,System.Single,System.Boolean)">
<summary>Tweens a Slider's value to the given value. <summary>Tweens a Slider's value to the given value.
Also stores the Slider as the tween's target so it can be used for filtered operations</summary> Also stores the Slider as the tween's target so it can be used for filtered operations</summary>

View File

@ -174,6 +174,24 @@
<param name="duration">The duration of the tween</param> <param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param> <param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions46.DONormalizedPos(UnityEngine.UI.ScrollRect,UnityEngine.Vector2,System.Single,System.Boolean)">
<summary>Tweens a ScrollRect's horizontal/verticalNormalizedPosition to the given value.
Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOHorizontalNormalizedPos(UnityEngine.UI.ScrollRect,System.Single,System.Single,System.Boolean)">
<summary>Tweens a ScrollRect's horizontalNormalizedPosition to the given value.
Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOVerticalNormalizedPos(UnityEngine.UI.ScrollRect,System.Single,System.Single,System.Boolean)">
<summary>Tweens a ScrollRect's verticalNormalizedPosition to the given value.
Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOValue(UnityEngine.UI.Slider,System.Single,System.Single,System.Boolean)"> <member name="M:DG.Tweening.ShortcutExtensions46.DOValue(UnityEngine.UI.Slider,System.Single,System.Single,System.Boolean)">
<summary>Tweens a Slider's value to the given value. <summary>Tweens a Slider's value to the given value.
Also stores the Slider as the tween's target so it can be used for filtered operations</summary> Also stores the Slider as the tween's target so it can be used for filtered operations</summary>

View File

@ -174,6 +174,24 @@
<param name="duration">The duration of the tween</param> <param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param> <param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions46.DONormalizedPos(UnityEngine.UI.ScrollRect,UnityEngine.Vector2,System.Single,System.Boolean)">
<summary>Tweens a ScrollRect's horizontal/verticalNormalizedPosition to the given value.
Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOHorizontalNormalizedPos(UnityEngine.UI.ScrollRect,System.Single,System.Single,System.Boolean)">
<summary>Tweens a ScrollRect's horizontalNormalizedPosition to the given value.
Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOVerticalNormalizedPos(UnityEngine.UI.ScrollRect,System.Single,System.Single,System.Boolean)">
<summary>Tweens a ScrollRect's verticalNormalizedPosition to the given value.
Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOValue(UnityEngine.UI.Slider,System.Single,System.Single,System.Boolean)"> <member name="M:DG.Tweening.ShortcutExtensions46.DOValue(UnityEngine.UI.Slider,System.Single,System.Single,System.Boolean)">
<summary>Tweens a Slider's value to the given value. <summary>Tweens a Slider's value to the given value.
Also stores the Slider as the tween's target so it can be used for filtered operations</summary> Also stores the Slider as the tween's target so it can be used for filtered operations</summary>

View File

@ -32,7 +32,7 @@ namespace DG.Tweening
public class DOTween public class DOTween
{ {
/// <summary>DOTween's version</summary> /// <summary>DOTween's version</summary>
public static readonly string Version = "1.1.160"; public static readonly string Version = "1.1.165";
/////////////////////////////////////////////// ///////////////////////////////////////////////
// Options //////////////////////////////////// // Options ////////////////////////////////////

View File

@ -348,6 +348,42 @@ namespace DG.Tweening
#endregion #endregion
#region ScrollRect
/// <summary>Tweens a ScrollRect's horizontal/verticalNormalizedPosition to the given value.
/// Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
/// <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
/// <param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
public static Tweener DONormalizedPos(this ScrollRect target, Vector2 endValue, float duration, bool snapping = false)
{
return DOTween.To(() => new Vector2(target.horizontalNormalizedPosition, target.verticalNormalizedPosition),
x => {
target.horizontalNormalizedPosition = x.x;
target.verticalNormalizedPosition = x.y;
}, endValue, duration)
.SetOptions(snapping).SetTarget(target);
}
/// <summary>Tweens a ScrollRect's horizontalNormalizedPosition to the given value.
/// Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
/// <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
/// <param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
public static Tweener DOHorizontalNormalizedPos(this ScrollRect target, float endValue, float duration, bool snapping = false)
{
return DOTween.To(() => target.horizontalNormalizedPosition, x => target.horizontalNormalizedPosition = x, endValue, duration)
.SetOptions(snapping).SetTarget(target);
}
/// <summary>Tweens a ScrollRect's verticalNormalizedPosition to the given value.
/// Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
/// <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
/// <param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
public static Tweener DOVerticalNormalizedPos(this ScrollRect target, float endValue, float duration, bool snapping = false)
{
return DOTween.To(() => target.verticalNormalizedPosition, x => target.verticalNormalizedPosition = x, endValue, duration)
.SetOptions(snapping).SetTarget(target);
}
#endregion
#region Slider #region Slider
/// <summary>Tweens a Slider's value to the given value. /// <summary>Tweens a Slider's value to the given value.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -174,6 +174,24 @@
<param name="duration">The duration of the tween</param> <param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param> <param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member> </member>
<member name="M:DG.Tweening.ShortcutExtensions46.DONormalizedPos(UnityEngine.UI.ScrollRect,UnityEngine.Vector2,System.Single,System.Boolean)">
<summary>Tweens a ScrollRect's horizontal/verticalNormalizedPosition to the given value.
Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOHorizontalNormalizedPos(UnityEngine.UI.ScrollRect,System.Single,System.Single,System.Boolean)">
<summary>Tweens a ScrollRect's horizontalNormalizedPosition to the given value.
Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOVerticalNormalizedPos(UnityEngine.UI.ScrollRect,System.Single,System.Single,System.Boolean)">
<summary>Tweens a ScrollRect's verticalNormalizedPosition to the given value.
Also stores the ScrollRect as the tween's target so it can be used for filtered operations</summary>
<param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param>
<param name="snapping">If TRUE the tween will smoothly snap all values to integers</param>
</member>
<member name="M:DG.Tweening.ShortcutExtensions46.DOValue(UnityEngine.UI.Slider,System.Single,System.Single,System.Boolean)"> <member name="M:DG.Tweening.ShortcutExtensions46.DOValue(UnityEngine.UI.Slider,System.Single,System.Single,System.Boolean)">
<summary>Tweens a Slider's value to the given value. <summary>Tweens a Slider's value to the given value.
Also stores the Slider as the tween's target so it can be used for filtered operations</summary> Also stores the Slider as the tween's target so it can be used for filtered operations</summary>

Binary file not shown.