Skip to content
New issue

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

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

Already on GitHub? # to your account

Image - allow passing of quad and image and more #52

Closed
flamendless opened this issue Sep 10, 2020 · 2 comments
Closed

Image - allow passing of quad and image and more #52

flamendless opened this issue Sep 10, 2020 · 2 comments

Comments

@flamendless
Copy link
Owner

Hi, it would be useful to allow something like:

Slab.Image("Animation", {
  Title = "Animation",
  Image = spritesheet,
  Quad = quad
})

As an alternative to Sub(x,y,w,h)


Also, for clarification, does the Sub variant in Image does the same as quad or it's for controlling how the image is drawn in the widget?

I've noticed that using the Scale with Sub variants makes the image overflow in the widget without the widget size and succeeding elements adjust properly.

@coding-jackalope
Copy link
Collaborator

Hi @flamendless, thanks for the suggestion. I'll add this to the upcoming patch release.

The Sub variant will actually create a quad with the given settings and will reference the texture coordinates supplied in the call. Slab should then add the widget based on the bounds of the quad. If not, I'll try to reproduce the issue and fix it for the upcoming release.

@flamendless
Copy link
Owner Author

Oh i mistyped the last part. I meant that using the Scale with the Sub variants makes the image overflow the window. It also overlaps behind other widgets.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants