Commit Graph

8 Commits

Author SHA1 Message Date
Christopher Whitley c814a65aea Bump version to 4.0.2 (#939) 2024-08-28 00:05:33 -04:00
Christopher Whitley da81c353f6 Update for Monogame 3.8.2.1105 (#931)
* Update MonoGame references to 3.8.2.1105

* Vector2.Rotate is not built into MonoGame

* Update to net8

* Update version number

* Update changelog

* Deprecate Vector2.Rotate for MonoGame only

* Deprecate it but don't error it so API doesn't break for others.
2024-08-17 22:27:28 -04:00
Christopher Whitley 8850875fb4 Texture Atlas Refactor (#890)
* Moved `TextureRegion2D` and `NinePatchRegion2D` into Graphics namespace
These are used for more than just texture atlas related things and are primarly for working with `Texture2D` instances and creating sub textures from them.  Moving them to Graphics namespace where `Texture2D` lives in MonoGame

* Dropped the `2D` suffix from `TextureRegion2D` and `NinePatchRegion2D`

* Moved `RectanglExtensions` to project root
This moves the extensions for `Rectangle` to the same relative namespace location as `Rectangle` is in MonoGame.

* Renamed to `Rectangle.Extensions.cs`

* Separate `Rectangle` from `RectangleF` extensions

* Added `GetRelativeRectangle` method

* Updated documentation

* Added `GetRelativeRectangle` method

* Updated documentation

* Top-level namespace

* Remove whitespace

* Move properties up

* Top-level namespace

* Don't recreate structs for `Bounds` and Size`
By having the property return a new struct, this allocates on the stack during situations like a loop during draw.

* Size should be `Size` not `SizeF` value
Textures deal in pixels (ints not floats)

* Removed setter for `Texture` property
Texture should not be set after region is created

* Added UV properties

* Refactor constructors

* Added documentation

* Added license header

* Make it an actual extension method

* Added `GetSubRegion` extension methods for `TextureRegion`

* Update documentation about ObjectDisposedException

* Move const values to top

* Resolve errors from`TextureRegion` refactor

* Update unit tests for TextureRegion refactor

* Started NinePatch rework

* Refactored NinePatch

* Update for texture region constructor change

* Remove ninepatch from atlas

* Moved `TextureAtlasExtensions` into `SpriteBatch.Extensions`
These are extension methods for the sprite batch

* Updated to use new `DrawTextureRegion` method after rename

* Renamed to NinePatchJsonConverter

* Removed `GetRegion<T>`
TextureAtlas no longer contains nine patch regions, so this method isn't needed

* Update after `NinePatchRegion2DJsonConverter` name change

* Resolve errors from NinePatch refactor

* TextureAtlas rework

* Renamed `TextureRegion` to `Texture2DRegion`

* Moved ContentReaders to new Content\ContentReaders directory

* Moved TextureAtlasJsonConvert to Serialization directory

* Adjusted name from `Texture*` to `Texture2D*`

* Update runtimereader and runtimettype strings
2024-06-15 01:37:18 -04:00
Christopher Whitley 9bd208184f Update Changelog (#889)
* Updated so all projects have changelog in root when viewing in visual studio

* Updated changelog
2024-06-11 11:22:10 -04:00
Christopher Whitley 66277568c8 Refactor BitmapFont (#887)
* Update file header

* Created initial project to move BitmapFont too

* XMl, Text, and Binar reading now supported for BMFont

* Refactor BittmapFont

* Update content pipeline from BitmapFont refactor

* Update changelog
2024-06-11 00:25:10 -04:00
Christopher Whitley 1f0235c605 Updated Changelog (#886)
Added information about #885
2024-06-03 00:30:29 -04:00
Christopher Whitley d40ad10459 Make links for users (#884) 2024-06-01 17:34:24 -04:00
Christopher Whitley 4675bff3d4 Added changelog (#883)
* Added changelog

* Added note about unreleased
2024-06-01 17:22:23 -04:00