Skip to content

Commit

Permalink
Added missing DrawSpecific override in ScaledAnim
Browse files Browse the repository at this point in the history
Fixes #170
  • Loading branch information
justalemon committed Mar 20, 2024
1 parent 55635b9 commit c194fab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions LemonUI/Elements/ScaledAnim.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ public override void Draw()
UpdateTexture();
base.Draw();
}
/// <summary>
/// Draws the animation while only drawing a specific part of the element.
/// </summary>
/// <param name="topLeft">The top left corner of the area to draw.</param>
/// <param name="bottomRight">The bottom right corner of the area to draw.</param>
public override void DrawSpecific(PointF topLeft, PointF bottomRight)
{
UpdateTexture();
base.DrawSpecific(topLeft, bottomRight);
}

#endregion
}
Expand Down
4 changes: 3 additions & 1 deletion LemonUI/Elements/ScaledTexture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ public override void Draw()
/// <summary>
/// Draws a specific part of the texture on the screen.
/// </summary>
public void DrawSpecific(PointF topLeft, PointF bottomRight)
/// <param name="topLeft">The top left corner of the area to draw.</param>
/// <param name="bottomRight">The bottom right corner of the area to draw.</param>
public virtual void DrawSpecific(PointF topLeft, PointF bottomRight)
{
if (Size == SizeF.Empty)
{
Expand Down

0 comments on commit c194fab

Please sign in to comment.