From c194fab9732f9409b37cae661a4281279d4dc349 Mon Sep 17 00:00:00 2001 From: Hannele Ruiz Date: Tue, 19 Mar 2024 22:36:09 -0300 Subject: [PATCH] Added missing DrawSpecific override in ScaledAnim Fixes #170 --- LemonUI/Elements/ScaledAnim.cs | 10 ++++++++++ LemonUI/Elements/ScaledTexture.cs | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/LemonUI/Elements/ScaledAnim.cs b/LemonUI/Elements/ScaledAnim.cs index 8429ead..8376ddd 100644 --- a/LemonUI/Elements/ScaledAnim.cs +++ b/LemonUI/Elements/ScaledAnim.cs @@ -148,6 +148,16 @@ public override void Draw() UpdateTexture(); base.Draw(); } + /// + /// Draws the animation while only drawing a specific part of the element. + /// + /// The top left corner of the area to draw. + /// The bottom right corner of the area to draw. + public override void DrawSpecific(PointF topLeft, PointF bottomRight) + { + UpdateTexture(); + base.DrawSpecific(topLeft, bottomRight); + } #endregion } diff --git a/LemonUI/Elements/ScaledTexture.cs b/LemonUI/Elements/ScaledTexture.cs index 1913a94..25042a5 100644 --- a/LemonUI/Elements/ScaledTexture.cs +++ b/LemonUI/Elements/ScaledTexture.cs @@ -138,7 +138,9 @@ public override void Draw() /// /// Draws a specific part of the texture on the screen. /// - public void DrawSpecific(PointF topLeft, PointF bottomRight) + /// The top left corner of the area to draw. + /// The bottom right corner of the area to draw. + public virtual void DrawSpecific(PointF topLeft, PointF bottomRight) { if (Size == SizeF.Empty) {