improved debug.

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

View File

@ -54,11 +54,9 @@
<Compile Include="Camera\Camera2D.cs" /> <Compile Include="Camera\Camera2D.cs" />
<Compile Include="ContentSystem\ContentData.cs" /> <Compile Include="ContentSystem\ContentData.cs" />
<Compile Include="ContentSystem\ContentManagerController.cs" /> <Compile Include="ContentSystem\ContentManagerController.cs" />
<Compile Include="ContentSystem\ContentResolvers\FontContentResolver.cs" /> <Compile Include="ContentSystem\IContentPathResolver.cs" />
<Compile Include="ContentSystem\ContentResolvers\ResolutionContentResolver.cs" />
<Compile Include="ContentSystem\IContentPathModifier.cs" />
<Compile Include="ContentSystem\ContentResolvers\NormalContentResolver.cs" />
<Compile Include="Configuration.cs" /> <Compile Include="Configuration.cs" />
<Compile Include="ContentSystem\NormalContentResolver.cs" />
<Compile Include="SpecialTypes\ISpecialDrawable.cs" /> <Compile Include="SpecialTypes\ISpecialDrawable.cs" />
<Compile Include="SpecialTypes\NinePatch.cs" /> <Compile Include="SpecialTypes\NinePatch.cs" />
<Compile Include="SpecialTypes\Resolution.cs" /> <Compile Include="SpecialTypes\Resolution.cs" />

View File

@ -33,8 +33,8 @@ namespace RecrownedAthenaeum.SpecialTypes
{ {
this.texture = texture; this.texture = texture;
if (textureBounds.HasValue) textureRegion = textureBounds.Value; else textureRegion = texture.Bounds; 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 (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("c and d cannot be greater or equal to the height of the texture."); 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.left = left;
this.right = right; this.right = right;
this.bottom = bottom; this.bottom = bottom;