Skip to content

ImageButtonDemo.llua

xu.jingyu edited this page Aug 11, 2020 · 2 revisions

copy下面代码,运行试试

YELLOW = Color(0xffff00)
imgUrl1 = "https://hbimg.huabanimg.com/973de16798446890fc3b5f55a978db53c36059e619f83-5eeIuJ_fw658"
imgUrl2 = "https://hbimg.huabanimg.com/1987ff275ea4f85f1efcd5c9263f779357855302c52b-ayV6qn_fw658"
---
--- UI
ui {
    --- layout views
    ImageButton().width(100)
    .height(100)
    .bgColor(YELLOW)
    .setImage(imgUrl1, imgUrl2)
    .padding(30, 30, 30, 30)
}

---
--- preview
function preview()

end
Clone this wiki locally