Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Initialize scene and slide show layer.
- Scene * s = [Scene node];
- SlideShowLayer * ssl = [SlideShowLayer node];
- // Set positions for the background and labels.
- // Generally you'll be using full screen backgrounds
- // (screenshots), and positioning them at the center.
- [ssl setBackgroundXPosition:100];
- [ssl setBackgroundYPosition:100];
- [ssl setDescriptionXPosition: 200];
- [ssl setDescriptionYPosition: 200];
- [ssl setDescriptionWidth:100];
- [ssl setDescriptionHeight:300];
- [ssl setFontName:@"Helvetica"]; // optional
- [ssl setFontSize:24]; // optional
- // Add slides in order they appear.
- [ssl addSlideWithBackground:@"pic1.png" andDescription:@"Yada yada one."];
- [ssl addSlideWithBackground:@"pic2.png" andDescription:@"Yada yada two."];
- [ssl addSlideWithBackground:@"pic3.png" andDescription:@"Yada yada 3."];
- [ssl addSlideWithBackground:@"pic4.png" andDescription:@"Yada yada 4."];
- [ssl addSlideWithBackground:@"pic5.png" andDescription:@"Yada yada 5."];
- [ssl addSlideWithBackground:@"pic6.png" andDescription:@"Yada yada six."];
- // Start and display the slide show.
- [ssl displayFirstSlide];
- [scene add:ssl];
- [[Director sharedDirector] pushScene:scene];
Add Comment
Please, Sign In to add comment