function UIFlowerFish:ctor()
self.rootWidget = cc.CSLoader:createWidget("UI/flowerFish.csb");
--获取scrollview控件:
local scroll_view = ccui.Helper:seekWidgetByName(self.rootWidget,"ScrollView_1");
--设置scollview的滚动区域:
scroll_view:setInnerContainerSize(cc.size(200,170*12))
--设置滚动区域的图片(分别是数字0,9,8,7,6,5,4,3,2,1,0,9)
for i =1 , 4 do
for n=-1,10 do
if n == 10 then
local sp = cc.Sprite:create("UI/Image/slot/roll0.png")
sp:setPosition(100,170*12-(n+1)*170)
scroll_view:addChild(sp)
elseif n == -1 then
local sp = cc
self.rootWidget = cc.CSLoader:createWidget("UI/flowerFish.csb");
--获取scrollview控件:
local scroll_view = ccui.Helper:seekWidgetByName(self.rootWidget,"ScrollView_1");
--设置scollview的滚动区域:
scroll_view:setInnerContainerSize(cc.size(200,170*12))
--设置滚动区域的图片(分别是数字0,9,8,7,6,5,4,3,2,1,0,9)
for i =1 , 4 do
for n=-1,10 do
if n == 10 then
local sp = cc.Sprite:create("UI/Image/slot/roll0.png")
sp:setPosition(100,170*12-(n+1)*170)
scroll_view:addChild(sp)
elseif n == -1 then
local sp = cc