It looks like you're new here. If you want to get involved, click one of these buttons!
level = gideros.class(Sprite) function level:init() AceSlide.init({ orientation = 'vertical', spacing = 10, parent = stage, speed = 5, unfocusedAlpha = 0.75, easing = nil, allowDrag = true, dragOffset = 10 }) --create 10 boxes local yPos = 0 for i = 1, 10 do box = Button.new(Bitmap.new(Texture.new("files/test.png")), Bitmap.new(Texture.new("files/test.png"))) box:addEventListener("click", function(e) local target = e.__target print(target.id) e:stopPropagation() sceneManager:changeScene("game", 1, SceneManager.moveFromLeft, easing.outBack) end) levelText = TextField.new(font, "Level: " .. i) box:setPosition(100, yPos) box.id = i AceSlide.add(box) end --display slider AceSlide.show() self:addEventListener("enterBegin", self.onTransitionInBegin, self) self:addEventListener("enterEnd", self.onTransitionInEnd, self) self:addEventListener("exitBegin", self.onTransitionOutBegin, self) self:addEventListener("exitEnd", self.onTransitionOutEnd, self) end |
Comments
https://github.com/ar2rsawseen/AceSlide_oop
It will be removed as every child of the scene