cocos2d::ui::ListView里有一个setMagneticType
,作用是用来设置item的对齐方式。
加上getCenterItemInCurrentView
和getIndex
,就能做出数字滚轮,效果如下:
不过到了0和9的时候不能循环转,是一个需要完善的地方。
cocos2d::ui::ListView里有一个setMagneticType
,作用是用来设置item的对齐方式。
加上getCenterItemInCurrentView
和getIndex
,就能做出数字滚轮,效果如下:
不过到了0和9的时候不能循环转,是一个需要完善的地方。