سؤال

I want to make a Scrollable Label in NGUI. Suppose there is list of name of producer, programmer, artiest and other stuff in Label. and there is also scroll bar when i pull up and down. It will show list of contents in Scrollable View. I searched in internet but i did not get idea how access label height and how to put in scroll bar and how to make clipping rectangle.

Any help will be appreciated.

هل كانت مفيدة؟

المحلول

You should use UIScrollView component. It is used together with UIPanel to provide scrollable, clipped content. Usually it is used also with UIGrid or UITable, to provide functionality of scrolled table.

However in your case you should just create all your Credits content as a child of this UIScrollView. If you want, you can add another GameObject with UIScrollBar to provide scroll bar functionality.

If you take a closer look on imported NGUI package, you will find various Example scenes, where such functionality is used. Also this official tutorial may help: UIScrollView tutorial.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top