mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 12:58:33 +01:00
Made RuntimeTexturePacker restore texture region name and pivot when packing
This commit is contained in:
parent
b012c65990
commit
b2898a8eae
2 changed files with 5 additions and 1 deletions
|
@ -25,6 +25,7 @@ Improvements
|
|||
### MLEM.Data
|
||||
Improvements
|
||||
- Allow data texture atlas pivots and offsets to be negative
|
||||
- Made RuntimeTexturePacker restore texture region name and pivot when packing
|
||||
|
||||
Fixes
|
||||
- Fixed data texture atlases not allowing most characters in their region names
|
||||
|
|
|
@ -199,7 +199,10 @@ namespace MLEM.Data {
|
|||
// invoke callbacks
|
||||
foreach (var request in this.alreadyPackedTextures) {
|
||||
var packedArea = request.PackedArea.Shrink(new Point(request.Padding, request.Padding));
|
||||
request.Result.Invoke(new TextureRegion(this.PackedTexture, packedArea));
|
||||
request.Result.Invoke(new TextureRegion(this.PackedTexture, packedArea) {
|
||||
Pivot = request.Texture.Pivot,
|
||||
Name = request.Texture.Name
|
||||
});
|
||||
if (this.disposeTextures)
|
||||
request.Texture.Texture.Dispose();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue