I have a background image that I want to resize to fill the screen while keeping its aspect ratio. The image needs to be centered on the screen, but here is where it gets tricky:
I want the image to always fill the screen completely, screen should have no parts that are not covered by the image.
If I use aspect ratio constrain by width or height while anchoring to sides, I can only achieve it filling the screen in certain resolutions.
I draw a quick picture of how it is supposed to behave, it is in the attachment.
How would I do this in NGUI?
EDIT:
I created two versions of the background, one is restrained by width the other is by height. Then I check the aspect ratio of the screen and activate one of them that would be appropriate for that aspect ratio. That solves the problem.
Does NGUI have an included way to solve this or should I stick to my solution?