diff options
author | Starla Insigna <starla4444@gmail.com> | 2011-08-23 07:52:24 -0400 |
---|---|---|
committer | Starla Insigna <starla4444@gmail.com> | 2011-08-23 07:52:24 -0400 |
commit | c9337218ef1660360097928c753bde1c79775618 (patch) | |
tree | 3cd6f9926cbe092c98776673800b830eef27ca01 /Classes/GameModeSelectionLayer.h | |
parent | 2ac50443ddbf69b7594808ba4e6de49eecbc0b84 (diff) | |
download | cartcollect-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/GameModeSelectionLayer.h')
-rw-r--r-- | Classes/GameModeSelectionLayer.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Classes/GameModeSelectionLayer.h b/Classes/GameModeSelectionLayer.h index 2f57bfb..451a5f8 100644 --- a/Classes/GameModeSelectionLayer.h +++ b/Classes/GameModeSelectionLayer.h | |||
@@ -7,8 +7,15 @@ | |||
7 | // | 7 | // |
8 | 8 | ||
9 | #import "cocos2d.h" | 9 | #import "cocos2d.h" |
10 | #import "TouchDelegatingView.h" | ||
11 | #import "CocosOverlayScrollView.h" | ||
12 | #import "GameModeSelectionDelegate.h" | ||
10 | 13 | ||
11 | @interface GameModeSelectionLayer : CCLayer | 14 | @interface GameModeSelectionLayer : CCLayer <GameModeSelectionDelegate> { |
15 | NSMutableArray* gameModes; | ||
16 | TouchDelegatingView* touchDelegatingView; | ||
17 | CocosOverlayScrollView* scrollView; | ||
18 | } | ||
12 | 19 | ||
13 | + (CCScene*)scene; | 20 | + (CCScene*)scene; |
14 | - (id)init; | 21 | - (id)init; |