how to load images like image gallery in cocos2d-x 3.4

  • mihir77
    Likes 0

    Problem Description

    I have a problem, i am loading images and title from server, and i want to load it in 3*3 matrix.

     

    want to load the images from left to right and after loading 3 images add on next row.If there are many images i want it to scroll vertically up and down..

    So i can't use horizontal as well as vertical scrolling in listview and in scroll view i have to add position manually..

    so how to make it, like in tableview..in cocos2d-x 3.4..PLease help, am stuck..

  • Sonar Systems admin
    Likes 0

    Could you explain what you would like to achieve a little more

  • mihir77
    Likes 0

    Sure,

    User creates some images in the app which are stored in the server. Now i want to load this images from the server and i want it to be displayed like i described above.

    Now the user can selects the image of which he wants to see the details. Each object has image and title and some more text details..When the user selects a particular image say ”aaa” then a new scene with the details of that image is shown..

    so i want to load it 3 in a row and scrollbar to scroll down if there are more images created by the user..

     

  • Sonar Systems admin
    Likes 0

    Could you create a mockup of the design so we can see what you want to achieve

  • mihir77
    Likes 0

    Sorry for late reply, there is some change in plans..we are improving the design..

    Previous we were just loading in rows, now we want to load it like this..This is rough mockup..

    The red and grey is a stage area and white circles are the images which i receive from server. white images are to be loaded only in red area which is a polygon with multiple sides..

    but the red and grey part together is a single stage..

    the stage has no use in the game, it can be just a background, user have to click only white images which are loaded on it and a new scene is opened showing the details of that image..(this images are loaded from server depending on number of images created by user).

    this white images should be loaded randomly on red polygon but should not overlap and should not be loaded on grey area..

    So how to identify the area of a sprite and load images in it?

    do i have to create 2 different physics body polygon for red n greay and join in a code? the problem is the shape of red n grey is complex. is there a way to load white images on red area without making it physics body..

    thanks, some code for reference would be great..

     

     

     


  • Sonar Systems admin
    Likes 0

    There seems to be a missing image

  • mihir77
    Likes 0

    Just updated the image link..can you see now..

Login to reply