improved debug.

This commit is contained in:
2019-01-21 23:38:50 -06:00
parent 1b54dd2d28
commit 9ba854818a
2 changed files with 4 additions and 6 deletions

View File

@@ -33,8 +33,8 @@ namespace RecrownedAthenaeum.SpecialTypes
{
this.texture = texture;
if (textureBounds.HasValue) textureRegion = textureBounds.Value; else textureRegion = texture.Bounds;
if (left + right >= textureRegion.Width) throw new ArgumentOutOfRangeException("a and b cannot be greater than or equal to the width of region.");
if (bottom + top >= textureRegion.Height) throw new ArgumentOutOfRangeException("c and d cannot be greater or equal to the height of the texture.");
if (left + right >= textureRegion.Width) throw new ArgumentOutOfRangeException("left and right values cannot be greater than or equal to the width of region. Left value is " + left + " and right value is " + right + ". Bounds of texture are: " + textureRegion);
if (bottom + top >= textureRegion.Height) throw new ArgumentOutOfRangeException("Bottom and top values cannot be greater than or equal to the width of region. Bottom value is " + bottom + " and top value is " + top + ".");
this.left = left;
this.right = right;
this.bottom = bottom;