new XUIOverlayCarousel()
Methods
-
AppendItem(strName)
-
添加一项
Parameters:
Name Type Description strName
String 项名称 -
ClearAll()
-
清空所有数据
-
DeleteItemByIndex(nIndex)
-
通过序号删除一项
Parameters:
Name Type Description nIndex
Number 项名称 -
GetCheckedName() → {String}
-
获取选中项名称
Returns:
String - 选中区域名称 -
GetNameByIndex(nIndex) → {String}
-
通过序号获取项名
Parameters:
Name Type Description nIndex
Number 序号 Returns:
String - 项名 -
SetAutoPlay(bAutoPlay)
-
是否轮播
Parameters:
Name Type Description bAutoPlay
Boolean 颜色 Properties:
Name Type Description AutoPlay
Boolean true -
SetBgTextColor(strColor)
-
设置非当前文本颜色
Parameters:
Name Type Description strColor
String 颜色 Properties:
Name Type Description BgTextColor
Color "0xff5f6d92" -
SetFirstBgImg(strImg)
-
设置当前文本背景
Parameters:
Name Type Description strImg
ImageProp 背景图片 Properties:
Name Type Description FirstBgImg
ImageProp "bgwz/XUIOverlayCarousel/images/btn_dxhdbz_tab1.png" -
SetFirstTextColor(strColor)
-
设置当前文本颜色
Parameters:
Name Type Description strColor
String 颜色 Properties:
Name Type Description FirstTextColor
Color "0xffffffff" -
SetItemArrData(itemArr)
-
设置模板数据
Parameters:
Name Type Description itemArr
Array 项数组 -
SetItemNameByIndex(nIndex, strName)
-
通过序号修改文本
Parameters:
Name Type Description nIndex
Number 项名称 strName
String 项名称 -
SetOtherBgImg(strImg)
-
设置非当前文本背景
Parameters:
Name Type Description strImg
ImageProp 背景图片 Properties:
Name Type Description OtherBgImg
ImageProp "bgwz/XUIOverlayCarousel/images/btn_dxhdbz_tab2.png" -
SetRunSpeed(nSpeed)
-
轮播速度(ms)
Parameters:
Name Type Description nSpeed
Number 颜色 Properties:
Name Type Description RunSpeed
Number 2000