Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Just like we play angry birds and get a level screen.It shows 40 or 30 levels at a time on the screen.This means I have to create 40 CCMenuItemImage buttons.This is not the best optimized way.Can anyone here help in how to create a level screen with 30 levels at a time on the screen and also we have to show 3 stars image (on and off) on each level button just like angry birds or any other level game which has stars associated with the levels.Please answer in c++ cocos2d-x
Posted

use buttons: make images for all buttons, it can be screenshots which you must resize and do some "polish".

Create the buttons via code, so you can use some looping funtionality to position them. I would name the pic like "screen00.png" and so on...

I found this: http://stackoverflow.com/questions/1378765/how-do-i-create-a-basic-uibutton-programmatically[^]
 
Share this answer
 
I have yet to find a better way of doing so other than manually. Though you could reduce the dirty work by treating the level select screen as just another level and design it visually via LevelHelper or some other level designer.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900