Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: laurentl on April 02, 2013, 02:57:43 AM

Title: What is the best way to make a side panel that spans the height of the screen
Post by: laurentl on April 02, 2013, 02:57:43 AM
The stripe panel is made of one tiled sprite and a few normal or split sprites and these elements are all under one panel.
1- how do I size the panel so its top and bottom sticks to the top and bottom of the screen (a sort of size anchor)?
2- how do I scale the panel in a way that doesn't deform the way the sprites look but only resize the childrens (so the stripe pattern doesn't stretch but the rectangle that holds it resizes)

 https://www.youtube.com/watch?v=-BzrFWxqD9A (https://www.youtube.com/watch?v=-BzrFWxqD9A)
Title: Re: What is the best way to make a side panel that spans the height of the screen
Post by: Nicki on April 02, 2013, 04:24:48 AM
Use a UITiledSprite and put a UIStretch script directly on it.
Title: Re: What is the best way to make a side panel that spans the height of the screen
Post by: laurentl on April 02, 2013, 04:37:06 AM
Thanks that works.

How do I also stretch the draggable panel to fit the screen's height ?
Title: Re: What is the best way to make a side panel that spans the height of the screen
Post by: Nicki on April 02, 2013, 05:28:31 AM
You have to do a custom script for that and set the clipRange on the UPanel.