Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Vertical Content Scroll and Button Expand on Touch — Gideros Forum

Vertical Content Scroll and Button Expand on Touch

Nathan_DNathan_D Member
edited June 2013 in Game & application design
Hi everyone :)

I am curious as to how to implement a vertical scroll and a button expanding upon touch for my shop screen. I am aware that AceSlide is used in the sample codes, but I'm not scrolling through levels but through a shop with items instead, where on touch would have the item button expand with a description. I know how buttons work, but I have no idea how to make that transition from the button being small to it expanding, as I usually just remove the old button and replace it with the depressed one.

The following video of JetPack Joyride shows what I mean in terms of the scrolling and the button expansion at 00:35. It is the Facebook version of the game (with a mouse pointer), but just pretend he is swiping to scroll and touching the button to expand :P



I'm also curious how the scroller on the right hand side is made as well (I am new at this :P)

Thanks so much for your help! :)

Nathan

Comments

  • ar2rsawseenar2rsawseen Maintainer
    @Nathan_D it seems you want something like this:

    http://www.giderosmobile.com/forum/discussion/3147/achievements#Item_1

    Also there were other ListView implementations (more elegant than what I provided), but I can't really find them right now.
  • bowerandybowerandy Guru
    edited June 2013
    @Nathan_D, this thread:

    http://www.giderosmobile.com/forum/discussion/comment/20867

    .. has some details of my BhItemSlider. The video shows just text being scrolled but you can put anything in there to include graphics.

    You might also like to investigate my BhButton, which is a derivative of the original Gideros button. Among other things, this allow you to set a downScale for magnifying the size of a button when pressed (without having to define a "pressed" second bitmap). The code is here:

    https://github.com/bowerhaus/BhButton

    best regards
  • Hi Andy @bowerandy ,

    Just took a look at BhItemSlider off github because I was curious. FYI, if you scroll and then do a long tap and hold, on release event generates a crash everytime.
    main.lua:71: attempt to index local 'object' (a nil value)
    stack traceback:
    	main.lua:71: in function 'highlightOnTouchFunc'
    	BhItemSlider.lua:289: in function 'onTouchIsLongTap'
    	BhItemSlider.lua:275: in function 'func'
    	[string "compatibility.lua"]:32: in function <[string "compatibility.lua"]:31>
    Thought you might like to know...

    Best regards,

    - Ian
  • @ianchia,

    Okay, thanks for that. Please pull the latest version of BhItemSlider.lua.

    best regards
  • Hi @ar2rsawseen and @bowerandy :)

    Thank you for your replies. My scrolling problem has been solved because of your quick replies :)

    With regards to the button expansion, I plan to have the button itself expand rather than create another section on click. @bowerandy, I played with your button and it seems great! However, I'm sorry if this is much to ask but would it be okay if you provided a source example of your button expansion with displayed text on touch in action? I'm very new to coding and I learn best by picking apart a source code example. I hope this isn't too much to ask.

    Thank you both again very much! Cheers!
Sign In or Register to comment.