Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: phenotype on August 25, 2012, 09:49:26 AM
-
Sorry, new to NGUI so forgive me if this is dense or already documented somewhere. I couldn't find anything.
My UI has a banner across the top which is 40px high. It has a status bar across the bottom that is also 40px high. I now want to place a sliced sprite so that it scales between the banner and header bar. When I anchor it center and stretch it vertical it stretches from the top of the window to the bottom but I want it to stretch to the bottom of the banner and top of the status bar. What is the best way to do this? I noticed you have a table object but it seems to require rows to be the same height.
Thanks
Robert
-
For this case, just create a small script that will set the localScale.y to Screen.height - 80f.
-
Already done. I added height and width offsets to the UIStretch scripts. I was just wondering if there was already a widget or script that did this so I could follow the correct standard. I would recommend a split panel for future iterations that allows you to fix the size of one and dynamically scale the other.
Thanks for your help Aren.