local slider = ccui.Slider:create()
slider:loadBarTexture("slider/Slider_Back.png", 0)
slider:loadProgressBarTexture("slider/Slider_PressBar.png", 0)
slider:loadSlidBallTextures("slider/SliderNode_Normal.png", "slider/SliderNode_Press.png", "slider/SliderNode_Disable.png", 0)
-- self:addChild(slider)
slider:addTo(self):center()
slider:setPercent(50)
slider:addEventListener(function(sender, eventType)
if eventType == ccui.SliderEventType.percentChanged then
print(slider:getPercent())
end
end)