Author Topic: How to align a background image for different screen resolutions.  (Read 6638 times)

ysrikanth2011

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 12
    • View Profile
Hi,


I am having a Texture of dimensions 800(width)  and 1280 (height). I want to align this as a background image for every menu.
I am creating this a NGUI-> Create -> Texture.
The problem is this image is not aligned correctly for different screen resolutions.
The corners are not being aligned properly. If I align the scaling in one resolution and it differs in another screen res.


How can I overcome this ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to align a background image for different screen resolutions.
« Reply #1 on: July 29, 2014, 02:44:31 AM »
You can anchor it. Anchored sprite will resize according to how you anchored it. I explain how anchoring works in video tutorials and on the documentation page for UIRect.

ysrikanth2011

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 12
    • View Profile
Re: How to align a background image for different screen resolutions.
« Reply #2 on: July 29, 2014, 09:05:10 AM »
Thankyou very much Aren Mook . I am very happy with NGUI and your support.