From e302b3bd8fae0b8456f834a38c136f35684c230d Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Wed, 1 Sep 2021 02:06:07 +0200 Subject: [PATCH] feat: add IsInverse to Easing --- Dalamud/Interface/Animation/Easing.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Dalamud/Interface/Animation/Easing.cs b/Dalamud/Interface/Animation/Easing.cs index 441108e6f..00509169f 100644 --- a/Dalamud/Interface/Animation/Easing.cs +++ b/Dalamud/Interface/Animation/Easing.cs @@ -38,12 +38,24 @@ namespace Dalamud.Interface.Animation /// public Vector2 EasedPoint { get; private set; } + /// + /// Gets or sets a value indicating whether the result of the easing should be inversed. + /// + public bool IsInverse { get; set; } + /// /// Gets or sets the current value of the animation, from 0 to 1. /// public double Value { - get => this.valueInternal; + get + { + if (this.IsInverse) + return 1 - this.valueInternal; + + return this.valueInternal; + } + protected set { this.valueInternal = value;