Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Alan Gray on May 04, 2012, 05:04:32 PM

Title: clipping and nested panels
Post by: Alan Gray on May 04, 2012, 05:04:32 PM
I'm having some clipping issues with a draggable panel. The draggable panel only contains a grid. If the grid is filled with Sprites, clipping works as expected. If I put the sprites into sub-panels, clipping stops working. I'm using the sub-panels because I want to have some associated text with the spite all within a grid cell. Is the sub-panel the correct way to group these elements?


clips correctly:
...
 Anchor
  Panel
   Grid
    Sprite00
    Sprite01
    Sprite02
    Sprite03

Doesn't clip:
...
 Anchor
  Panel
   Grid
    Panel00
     Sprite00
    Panel01
     Sprite01
    Panel02
     Sprite02
    Panel03
     Sprite03

The real structure I'm after:
...
 Anchor
  Panel
   Grid
    Panel00
     LabelA
     LabelB
     LabelC
     Sprite00
    Panel01
     ...
    Panel02
    Panel03

Title: Re: clipping and nested panels
Post by: ArenMook on May 04, 2012, 06:27:06 PM
Each panel has its own clipping. You need to use only one panel, or clipping won't work.
Title: Re: clipping and nested panels
Post by: Alan Gray on May 04, 2012, 07:11:16 PM
OK - thanks for the fast reply! So, if I can't use a sub-panel, what it the correct way to group the Sprite and 3 labels I want in a grid cell?
Title: Re: clipping and nested panels
Post by: ArenMook on May 04, 2012, 07:25:12 PM
Just use a normal game object.
Title: Re: clipping and nested panels
Post by: Alan Gray on May 04, 2012, 09:15:49 PM
Works like a charm - thanks!