How To Add Scrolling For Coin Shop Ui?

Discussion in 'How Can I...?' started by Joseph V Macagubang, Mar 17, 2019.

  1. Joseph V Macagubang

    Joseph V Macagubang Boxer

    Joined:
    Feb 20, 2019
    Messages:
    6
    Likes Received:
    0
    how to add Scrolling for coin shop UI?
     
  2. Shashank Varshney

    Shashank Varshney Boxer

    Joined:
    Feb 22, 2020
    Messages:
    15
    Likes Received:
    2
    do you get any method? can anyone help to create a horizontal scrollable list, having buttons as item.
     
  3. JSeeger6

    JSeeger6 Boxer

    Joined:
    Aug 29, 2018
    Messages:
    93
    Likes Received:
    11
    If someone can figure out how to attach one object to another in a UI, then I might be able to get it to work. That's the only barrier I'm facing right now
     
  4. Shashank Varshney

    Shashank Varshney Boxer

    Joined:
    Feb 22, 2020
    Messages:
    15
    Likes Received:
    2
    I get some trace how to spawn items in a UI Object component. we can use spawn node, but with just one change....
    at line no. 22:


    Code:
    let ent = this.scene().create(asset);
    //Remove this line
    
    
    
    // replace above code with this code
    let ent = this.ui().create(asset);
    // this will spawn the items (Objects) to the screen


    so basically this will do work to create buttons as items in a list.
    but to scroll that list you have to place "Touch Move" node with combination of "Position Limiter" node(to stop the touch at a certain value).

    and also its depends upon you how you create that list Horizontal or vertical, you have to customise the "Touch Move" node and "Position Limiter" node.
     
    JSeeger6 likes this.
  5. Shashank Varshney

    Shashank Varshney Boxer

    Joined:
    Feb 22, 2020
    Messages:
    15
    Likes Received:
    2
    JSeeger6 likes this.
  6. JSeeger6

    JSeeger6 Boxer

    Joined:
    Aug 29, 2018
    Messages:
    93
    Likes Received:
    11
    You sir may have just found an excellent solution!!! I'll upload a functioning scrollable coin shop ASAP
     
    Shashank Varshney likes this.
  7. Shashank Varshney

    Shashank Varshney Boxer

    Joined:
    Feb 22, 2020
    Messages:
    15
    Likes Received:
    2
    Need is the mother of inventions
     
  8. JSeeger6

    JSeeger6 Boxer

    Joined:
    Aug 29, 2018
    Messages:
    93
    Likes Received:
    11
    Absolutely!!!

    Sorry for the late reply - attached below is a fully functioning scrollable coin shop template!
    I was having a bunch of issues spawning the character select to the scroll so I settled on a different solution: making the character select itself scroll and having the background stationary. You'll understand when you download!

    I also want to thank @Hanomax for the incredible tutorial on building out a coin shop. This template is my own spin-off of what they did, but they did a phenomenal job setting up the foundation which you can watch here: https://www.hanomaxgames.com/character-shop-system/

    Download the coin shop template here!

    Good luck!
     
    Shashank Varshney and Jackazoid like this.
  9. Shashank Varshney

    Shashank Varshney Boxer

    Joined:
    Feb 22, 2020
    Messages:
    15
    Likes Received:
    2

    Its good thing that you give best of your efforts for community, i also have created a shop system actually all the basic concept is same but with more bells and whistles, anyway the conclusion is when i merge it in the main project it works but crash the whole game when i opt any character from it and continue to play from last saved checkpoint. so i have to drop that system from the game.

    I literally give it much of my time to create it but it crash the game so i drop it.
    Anyways I will post that shop system soon, whenever i get a little free time.

    ya thank you again for your contribution for the community, this may help many of boxers who still are in pain.
     
  10. JSeeger6

    JSeeger6 Boxer

    Joined:
    Aug 29, 2018
    Messages:
    93
    Likes Received:
    11
    Thank you!!! I appreciate the kind words a lot. I'd love to see your store with the "bells and whistles" if you'd be willing to share it! Great job on figuring out an option that works for you - glad it could work out!
     

Share This Page