Scrollview, one of ngui Study Notes

Source: Internet
Author: User

I. createscrollview

1. First, select the Panel You Want To Be Your scroll view and right-click anywhere in the scene view to bring up the context menu, then choose attach-> scroll view.

2. The last step is to add the uidragscrollview script to at least one collide. like create sprite then attach the box colider. again, select the collider, right click in the scene view, attach-> drag scroll View

Note that you must add box colider before attach uidragsrollview.

3 last the first scrollview is finished. Like that

 

Ii. scrollview_v2
After scorllview is created, it can only be dragged on the item to be effective, and can be drag in the scorllview area.
1 Create-> widget scale the screen size equle to the size of scroll View
2 attach the box colider then attach the uidragscrollview
3 now you can drag scroll view item which contains the scrollview rectangle
Note that both scorll view and uiroot depth have panel components, even if the depth of the widget is higher than the depth of the item,

Because the depth of the scroll view panel is higher than that of the uiroot, you do not have to worry that the item cannot receive the drag event.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.