Author Topic: Anchor child, ignore parent scale  (Read 4519 times)

nkls

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 29
    • View Profile
Anchor child, ignore parent scale
« on: February 04, 2014, 06:44:16 AM »
Hi! First of all, great work on NGUI. The new anchor system is really easy to work with.
Got a quick question.. Im doing a popup-window, and my hierarchy is set up like this:

Panel
-Popup graphics
-Background sprite

Im using a tweenScale on my Panel to scale up my Popup graphics. While I do this, I want the background sprite to cover the screen.
I´m using the new anchor system to anchor the background sprite (target UI Root).
 
Problem is, when im running the tweenscale on my Panel, the background sprite scales to. How do I keep my background sprite to ignore the scale of its parent panel?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Anchor child, ignore parent scale
« Reply #1 on: February 04, 2014, 07:40:18 AM »
You should place your background sprite on a different panel.

UIRoot (and UIPanel)
- UI Camera
- Background Sprite
- Window (another UIPanel) <-- scale this