Skip to content

Commit

Permalink
Make sure that the framerate does not goes under zero
Browse files Browse the repository at this point in the history
  • Loading branch information
justalemon committed Dec 19, 2023
1 parent 587f761 commit 5cf4e43
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion LemonUI/Elements/ScaledAnim.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ public string Dictionary
public float FrameRate
{
get => frameRate;
set => frameRate = value;
set
{
if (frameRate <= 0)
{
throw new ArgumentOutOfRangeException(nameof(value), "The Frame Rate can't be equal or lower to zero.");
}

frameRate = value;
}
}
/// <summary>
/// The duration of the animation in milliseconds.
Expand Down

0 comments on commit 5cf4e43

Please sign in to comment.