cocos2dx-lua ScrollView加载大量项目
时间: 2023-08-07 21:05:22
浏览: 101
在cocos2dx-lua中,使用ScrollView加载大量项目可以通过以下[步骤]([http]([http](https://geek.csdn.net/educolumn/68f28ca3131d47699e5902c5d3d74d51?spm=1055.2569.3001.10083)s://geek.csdn.net/educolumn/68f28ca3131d47699e5902c5d3d74d51?spm=1055.2569.3001.10083)s://geek.csdn.net/educolumn/41e918968ef7840279c31b7f6a0950e3?spm=1055.2569.3001.10083)实现:
1. 创建一个ScrollView,并设置其[大小](https://geek.csdn.net/educolumn/7261b874aa6b3f947468605f42946d95?spm=1055.2569.3001.10083)和位置。
```lua
local scrollView = ccui.ScrollView:create()
scrollView:setContentSize(cc.size(500, 500))
scrollView:set[pos](https://geek.csdn.net/educolumn/0399089ce1ac05d7729a569fd611cf73?spm=1055.2569.3001.10083)ition(cc.p(0, 0))
```