Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image offsets by TextureRegion's pivot in an undesired way #33

Open
all-iver opened this issue Mar 7, 2025 · 1 comment
Open

Image offsets by TextureRegion's pivot in an undesired way #33

all-iver opened this issue Mar 7, 2025 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@all-iver
Copy link

all-iver commented Mar 7, 2025

When using MLEM's Image, if your TextureRegion has its pivot somewhere other than the top left of the texture region, this causes Image to draw with the texture's pivot at the top left of the UI rect. That makes it hard to reuse the same TextureRegion with a sprite that wants the pivot to be at an arbitrary area.

@Ellpeck Ellpeck added bug Something isn't working enhancement New feature or request labels Mar 7, 2025
@Ellpeck
Copy link
Owner

Ellpeck commented Mar 7, 2025

Note to self: we talked on the discord about the version of TextureRegionExtensions.Draw that takes in a Rectangle, and the fact that it seems to also use the pivot as a position offset there. I'm starting to think that maybe that doesn't actually make a lot of sense, and, when specifying the destination rectangle specifically, it should ignore the pivot for positioning outright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants