Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Choosing levels and packages — Gideros Forum

Choosing levels and packages

ar2rsawseenar2rsawseen Maintainer
edited January 2012 in Code snippets
Usually when I create something, I try to make it as configurable and reusable as possible. So I could use it in further projects and share it with others.

This is exactly the case. My feedback team voted, that package and level selecting system we had, wasn't good enough, so I created something more sophisticated, which maybe could be even used for other things. And I wanted to share it with all of you. :)

Basically it's an object slider, which have functions to slide to specific objects and even allows to switch between objects by draging them.

Here is a quick snippet for usage:
--initialize slider
AceSlide.init({
    orientation = 'vertical',
    spacing = 100,
    parent = stage,
    speed = 5,
    unfocusedAlpha = 0.75,
    easing = nil,
    allowDrag = true,
    dragOffset = 10
})
 
--create 10 boxes
for i = 1, 10 do
    local box = Bitmap.new(Texture.new('images/crate.png'))
    box:setScale(2)
    AceSlide.add(box)
end
 
--display slider
AceSlide.show()
And you can find project with all dependencies and demonstration video here: http://appcodingeasy.com/Gideros-Mobile/Easy-input-for-choosing-packages-or-levels-in-Gideros-Mobile

Feel free to use and modify

+1 -1 (+4 / -0 )Share on Facebook

Comments

Sign In or Register to comment.