summary refs log tree commit diff stats
path: root/Classes/GameModeSelection.h
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2011-08-23 07:52:24 -0400
committerStarla Insigna <starla4444@gmail.com>2011-08-23 07:52:24 -0400
commitc9337218ef1660360097928c753bde1c79775618 (patch)
tree3cd6f9926cbe092c98776673800b830eef27ca01 /Classes/GameModeSelection.h
parent2ac50443ddbf69b7594808ba4e6de49eecbc0b84 (diff)
downloadcartcollect-c9337218ef1660360097928c753bde1c79775618.tar.gz
cartcollect-c9337218ef1660360097928c753bde1c79775618.tar.bz2
cartcollect-c9337218ef1660360097928c753bde1c79775618.zip
Added scrolling to level selection screen
Using http://www.xcombinator.com/2010/09/08/a-paging-uiscrollview-in-cocos2d-with-previews/ as a base, I was able to implement a paging scroller for the level selection screen so players can swipe through available levels and choose one to play.

At this point, the level selection screen is practically done--the only other thing I want to add is a UIPageControl to interact with the scrolling and give the player an indication of how many levels there are.

Refs #207
Diffstat (limited to 'Classes/GameModeSelection.h')
-rw-r--r--Classes/GameModeSelection.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Classes/GameModeSelection.h b/Classes/GameModeSelection.h index f6aaeff..f69ea37 100644 --- a/Classes/GameModeSelection.h +++ b/Classes/GameModeSelection.h
@@ -7,17 +7,23 @@
7// 7//
8 8
9#import "cocos2d.h" 9#import "cocos2d.h"
10#import "GameModeSelectionDelegate.h"
10 11
11@interface GameModeSelection : CCNode { 12@interface GameModeSelection : CCMenuItem {
12 NSString* name; 13 NSString* name;
13 NSString* location; 14 NSString* location;
14 BOOL unlocked; 15 BOOL unlocked;
15 NSString* unlockCondition; 16 NSString* unlockCondition;
17 id<GameModeSelectionDelegate> delegate;
16} 18}
17 19
18@property (readonly) NSString* name; 20@property (readonly) NSString* name;
19@property (readonly) NSString* location; 21@property (readonly) NSString* location;
20@property (readonly) BOOL unlocked; 22@property (readonly) BOOL unlocked;
23@property (nonatomic,retain) id<GameModeSelectionDelegate> delegate;
24+ (id)selectionWithName:(NSString*)name location:(NSString*)location filename:(NSString*)filename unlocked:(BOOL)unlocked;
25+ (id)selectionWithName:(NSString *)name location:(NSString *)location filename:(NSString *)filename highscore:(int)highscore;
26+ (id)selectionWithName:(NSString *)name location:(NSString *)location filename:(NSString *)filename unlockCondition:(NSString*)unlockCondition;
21- (id)initWithName:(NSString*)name location:(NSString*)location filename:(NSString*)filename unlocked:(BOOL)unlocked; 27- (id)initWithName:(NSString*)name location:(NSString*)location filename:(NSString*)filename unlocked:(BOOL)unlocked;
22- (id)initWithName:(NSString *)name location:(NSString *)location filename:(NSString *)filename highscore:(int)highscore; 28- (id)initWithName:(NSString *)name location:(NSString *)location filename:(NSString *)filename highscore:(int)highscore;
23- (id)initWithName:(NSString *)name location:(NSString *)location filename:(NSString *)filename unlockCondition:(NSString*)unlockCondition; 29- (id)initWithName:(NSString *)name location:(NSString *)location filename:(NSString *)filename unlockCondition:(NSString*)unlockCondition;