LuaQuick框架(客户端)

996传奇引擎三端lua快速开发


翻页容器(PageView)

<p>[TOC]</p> <h3>创建翻页容器</h3> <pre><code>co.PageView:create(parent, id, x, y, width, height, direction)</code></pre> <pre><code>parent    父节点对象 id        唯一ID x         位置 横坐标 y         位置 纵坐标 width     宽度 height    高度 direction 方向</code></pre> <h3>设置翻页容器是否有裁切</h3> <pre><code>co.PageView:setClippingEnabled(widget, bool)</code></pre> <pre><code>widget 翻页容器对象 bool   是否有裁切</code></pre> <h3>设置翻页容器背景颜色</h3> <pre><code>co.PageView:setBackGroundColor(widget, color)</code></pre> <pre><code>widget 翻页容器对象 color  色值(#000000) 渐变色需传参table{&amp;quot;#FF0000&amp;quot;, &amp;quot;#FFFFFF&amp;quot;}</code></pre> <h3>设置翻页容器背景颜色类型</h3> <pre><code>co.PageView:setBackGroundColorType(widget, type)</code></pre> <pre><code>widget 翻页容器对象 type   类型 [1.单色; 2.渐变色]</code></pre> <h3>设置翻页容器背景透明度</h3> <pre><code>co.PageView:setBackGroundColorOpacity(widget, value)</code></pre> <pre><code>widget 翻页容器对象 value  透明度(0-255)</code></pre> <h3>设置翻页容器滚动到子页面</h3> <pre><code>co.PageView:scrollToPage(widget, index)</code></pre> <pre><code>widget 翻页容器对象 index  子页面序列号</code></pre> <h3>获取当前子页面序列号</h3> <pre><code>co.PageView:getCurrentPageIndex(widget)</code></pre> <h3>设置翻页容器当前子页序列号[3.40.3版本]</h3> <pre><code>co.PageView:setCurrentPageIndex(widget, index)</code></pre> <pre><code>widget 翻页容器对象 index  子页面序列号</code></pre> <h3>获取翻页容器子页面</h3> <pre><code>co.PageView:getItems(widget)</code></pre> <h3>获取翻页容器子页面数量</h3> <pre><code>co.PageView:getItemCount(widget)</code></pre> <h3>翻页容器加载子页面</h3> <pre><code>co.PageView:addPage(widget, child)</code></pre> <pre><code>widget 翻页容器对象 child  子页对象</code></pre> <h3>翻页容器加监听事件</h3> <pre><code>co.PageView:addEventListener(widget, callback)</code></pre>

页面列表

ITEM_HTML