I’m currently working on a ‘level select’ feature for my game, and I’m hoping to be able to cycle through each ‘stage’ with clickable arrows, and then you select your ‘stage’ then you see all available levels!
(I’ll attach a small illustration to show what I mean)
I have the basic funtionality down of the selecting a stage, and then selecting a level, but I have no idea how to tackle the carousel aspect! Any pointers or ideas are much appreciated! ^^
Well I will write the steps of achieving it in a simple manner. There would be deeper design steps to it but I will ignore those for now and deliver the fundamentals.
Know your Stages count available.
Upon button clicked get next/prev stage and build it.
Set Stages data and necessary elements.
Set child to container and render.
Ofcourse you can make animations after clicked or other improvements however this is basically easiests and hardcoded way of making a carousel but still extendable.
The proper way of doing it would be getting data from a new table struct. Getting the id of row and its elements and making it flexible for future usage with dynamic inserts, states and many more levels of design.
However I beleive this would help you to get things kick started.