-
Notifications
You must be signed in to change notification settings - Fork 314
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
Add repeat fit mode to image decorator #493
Conversation
5af0adc
to
7e6d984
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good! Thanks for the PR.
I think it would be helpful to add a warning and stop it from making the decorator when using a sprite together with the repeat modes. Could you implement that?
Perhaps we could name the new image something a bit more descriptive, e.g. alien_small.tga
?
I made the changes. I don't know if there's a better way of checking if we're within a spritesheet or not, but it works. As long as the it fills the entire texture, you can still use these in a spritesheet with a single element and no warning will appear. So you can still have control over the size of the texture by using the resolution (magnification) field. |
Looks great! Thanks again for the pull request :) If you want to, it would be helpful if you could add this feature to the documentation: https://mikke89.github.io/RmlUiDoc/pages/rcss/decorators/image.html |
I needed the ability to repeat a texture, and stumbled onto this issue.
The caveat is that this won't work using spritesheets, though I imagine you can still use atlases for repeating on a single axis, provided there are no gaps at the edges for that specific direction.
I haven't seen any regression anywhere by switching to
GL_REPEAT
but please double check.