From 9565d63e513efa20778da97e857f3be039499e35 Mon Sep 17 00:00:00 2001 From: Hannele Ruiz Date: Tue, 19 Dec 2023 01:58:28 -0300 Subject: [PATCH] Added simpler ScaledAnim constructors --- LemonUI/Elements/ScaledAnim.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/LemonUI/Elements/ScaledAnim.cs b/LemonUI/Elements/ScaledAnim.cs index 3a4a120..41b3f76 100644 --- a/LemonUI/Elements/ScaledAnim.cs +++ b/LemonUI/Elements/ScaledAnim.cs @@ -107,6 +107,22 @@ public int Duration #region Constructors + /// + /// Creates a new dictionary based animation. + /// + /// The texture dictionary (YTD) to use. + public ScaledAnim(string dict) : this(dict, PointF.Empty, SizeF.Empty) + { + } + /// + /// Creates a new dictionary based animation. + /// + /// The texture dictionary (YTD) to use. + /// The size of the animation. + public ScaledAnim(string dict, SizeF size) : this(dict, PointF.Empty, size) + { + texture.Dictionary = dict ?? throw new ArgumentNullException(nameof(dict)); + } /// /// Creates a new dictionary based animation. ///