Unity3d NGUI Panel 滑动菜单

NGUI,次功能由 UIDraggeablePanel.cs、UIDragPanelContents.cs、UICtenterOnChild.cs三块共同完成;

UIDraggeablePanel,关联在根层级,且必须得包含UIPanel;

属性介绍:

Scale:偏移量;

DragEffect:MomentumAndSpring,滑动特效;

Momentum Amount:快速滑动位移;

Show Scroll Bars :

跟ScrollBar:转轴有关;

UIPanel,设置:

Clipping:是Clip类型;

设置显示区域:子层级都只在“显示区域”显示:

 

UIDragPanelContents,关联在子层级,且必须包含BoxCollider,并且关联UIDraggeablePanel;

 

UICtenterOnChild,跟UIDraggeablePanel关联在一起,是某个子层级在滑动后居中对齐;

posted @ 2013-06-13 16:34  韦斯利yx  阅读(2115)  评论(0编辑  收藏  举报