--響應事件函數
local function selectedEvent(sender,eventType)
if eventType == ccui.CheckBoxEventType.selected then
cclog("eventType == ccui.CheckBoxEventType.selected ")
elseif eventType == ccui.CheckBoxEventType.unselected then
cclog("ccui.CheckBoxEventType.unselected unselected ")
end
end
--創建複選框
local checkBox = ccui.CheckBox:create()
checkBox:setTouchEnabled(true)
checkBox:loadTextures("check_box_normal.png",
"check_box_normal_press.png",
"check_box_active.png",
"check_box_normal_disable.png",
"check_box_active_disable.png")
checkBox:setPosition(cc.p(120, 300)) --座標